diff options
Diffstat (limited to 'test/Sema/typo-correction.c')
-rw-r--r-- | test/Sema/typo-correction.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Sema/typo-correction.c b/test/Sema/typo-correction.c index 8276737e4fec..d457257b3c3a 100644 --- a/test/Sema/typo-correction.c +++ b/test/Sema/typo-correction.c @@ -28,3 +28,15 @@ void func(int arg) { ; } } + +void banana(void); // expected-note {{'banana' declared here}} +int c11Generic(int arg) { + _Generic(hello, int : banana)(); // expected-error-re {{use of undeclared identifier 'hello'{{$}}}} + _Generic(arg, int : bandana)(); // expected-error {{use of undeclared identifier 'bandana'; did you mean 'banana'?}} +} + +typedef long long __m128i __attribute__((__vector_size__(16))); +int PR23101(__m128i __x) { + return foo((__v2di)__x); // expected-warning {{implicit declaration of function 'foo'}} \ + // expected-error {{use of undeclared identifier '__v2di'}} +} |