summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/decl-invalid.c
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-03-18 22:52:47 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-03-18 22:52:47 +0000
commitb1402ae94eb7ca0f52b358aaf8eae13247114bf7 (patch)
tree14940f4e599b70f7381b2332c39c3aa13a990799 /clang/test/Sema/decl-invalid.c
parentae0052f114cc43c9ddcf03e6d016f7de0b0edcc2 (diff)
downloadbcm5719-llvm-b1402ae94eb7ca0f52b358aaf8eae13247114bf7.tar.gz
bcm5719-llvm-b1402ae94eb7ca0f52b358aaf8eae13247114bf7.zip
Add missing diagnostic for a nested-name-specifier on a free-standing type definition. Bump some related diagnostics from warning to extension in C++, since they're errors there. Add some missing checks for function specifiers on non-function declarations.
llvm-svn: 177335
Diffstat (limited to 'clang/test/Sema/decl-invalid.c')
-rw-r--r--clang/test/Sema/decl-invalid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Sema/decl-invalid.c b/clang/test/Sema/decl-invalid.c
index f6fed3c92d0..0544304c20e 100644
--- a/clang/test/Sema/decl-invalid.c
+++ b/clang/test/Sema/decl-invalid.c
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 %s -fsyntax-only -verify
// See Sema::ParsedFreeStandingDeclSpec about the double diagnostic
-typedef union <anonymous> __mbstate_t; // expected-error {{declaration of anonymous union must be a definition}} expected-warning {{declaration does not declare anything}}
+typedef union <anonymous> __mbstate_t; // expected-error {{declaration of anonymous union must be a definition}} expected-warning {{typedef requires a name}}
// PR2017
@@ -14,7 +14,7 @@ int a() {
}
int; // expected-warning {{declaration does not declare anything}}
-typedef int; // expected-warning {{declaration does not declare anything}}
+typedef int; // expected-warning {{typedef requires a name}}
const int; // expected-warning {{declaration does not declare anything}}
struct; // expected-error {{declaration of anonymous struct must be a definition}} // expected-warning {{declaration does not declare anything}}
typedef int I;
OpenPOWER on IntegriCloud