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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/test/Sema/decl-invalid.c b/clang/test/Sema/decl-invalid.c
index 767d6e6ab40..78a9ee1d4bf 100644
--- a/clang/test/Sema/decl-invalid.c
+++ b/clang/test/Sema/decl-invalid.c
@@ -1,6 +1,7 @@
// RUN: clang %s -fsyntax-only -verify
-typedef union <anonymous> __mbstate_t; // expected-error {{declaration of anonymous union must be a definition}}
+// See Sema::ParsedFreeStandingDeclSpec about the double diagnostic
+typedef union <anonymous> __mbstate_t; // expected-error {{declaration of anonymous union must be a definition}} expected-error {{declaration does not declare anything}}
// PR2017
@@ -9,3 +10,9 @@ int a() {
int r[x()]; // expected-error {{size of array has non-integer type 'void'}}
}
+int; // expected-error {{declaration does not declare anything}}
+typedef int; // expected-error {{declaration does not declare anything}}
+const int; // expected-error {{declaration does not declare anything}}
+struct; // expected-error {{declaration of anonymous struct must be a definition}} // expected-error {{declaration does not declare anything}}
+typedef int I;
+I; // expected-error {{declaration does not declare anything}}
OpenPOWER on IntegriCloud