Skip to content

Commit

Permalink
[SVE] Add a couple of extra sizeless type tests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rsandifo-arm committed Nov 27, 2020
1 parent 7b8d50b commit a2d561f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clang/test/Sema/sizeless-1.c
Expand Up @@ -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
2 changes: 2 additions & 0 deletions clang/test/SemaCXX/sizeless-1.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit a2d561f

Please sign in to comment.