diff options
Diffstat (limited to 'test/Sema/decl-invalid.c')
-rw-r--r-- | test/Sema/decl-invalid.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Sema/decl-invalid.c b/test/Sema/decl-invalid.c index d241adcf2a..281e8a8d5c 100644 --- a/test/Sema/decl-invalid.c +++ b/test/Sema/decl-invalid.c @@ -1,3 +1,11 @@ // RUN: clang %s -fsyntax-only -verify typedef union <anonymous> __mbstate_t; // expected-error: {{expected identifier or}} + + +// PR2017 +void x(); +int a() { + int r[x()]; // expected-error: {{size of array has non-integer type 'void'}} +} + |