summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/decl-invalid.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/decl-invalid.c')
-rw-r--r--clang/test/Sema/decl-invalid.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/decl-invalid.c b/clang/test/Sema/decl-invalid.c
index d241adcf2ae..281e8a8d5c0 100644
--- a/clang/test/Sema/decl-invalid.c
+++ b/clang/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'}}
+}
+
OpenPOWER on IntegriCloud