[SVE] Add a couple of extra sizeless type tests

This patch adds tests for things that happened to be fixed by previous
patches, but that should continue working if we do decide to treat
sizeless types as incomplete types.

Differential Revision: https://reviews.llvm.org/D79584
This commit is contained in:
Richard Sandiford 2020-03-05 19:23:35 +00:00
parent 7b8d50b141
commit a2d561f1a3
2 changed files with 8 additions and 0 deletions

View File

@ -290,4 +290,10 @@ void test_generic(void) {
int a3[_Generic(0, svint8_t : 1, svint16_t : 2, default : 3) == 3 ? 1 : -1];
(void)_Generic(0, svint8_t : 1, svint8_t : 2, default : 3); // expected-error {{type 'svint8_t' (aka '__SVInt8_t') in generic association compatible with previously specified type 'svint8_t'}} expected-note {{compatible type}}
}
void test_compound_literal(void) {
svint8_t local_int8;
(void)(svint8_t){local_int8};
}
#endif

View File

@ -379,6 +379,8 @@ extern array_alias<int> *array_alias_int_ptr;
extern array_alias<svint8_t> *array_alias_int8_ptr; // expected-note {{in instantiation of template type alias 'array_alias' requested here}}
#endif
extern "C" svint8_t c_return_int8();
void cxx_only(int sel) {
svint8_t local_int8;
svint16_t local_int16;