summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/decl-invalid.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-08 21:33:23 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-08 21:33:23 +0000
commitf19ac0ede900dae8188eae0362027e60bfa82a32 (patch)
treefb13a15dbe02acb3e93a7de7a30bdfb70975fd1b /clang/test/Sema/decl-invalid.c
parentd9235dbc02f6b7054952b25a22c16670dfa8cb92 (diff)
downloadbcm5719-llvm-f19ac0ede900dae8188eae0362027e60bfa82a32.tar.gz
bcm5719-llvm-f19ac0ede900dae8188eae0362027e60bfa82a32.zip
Downgrade the "declaration does not declare anything" error to a
warning. It's not harmful to have such pointless declarations, and GCC does not diagnose this issue consistently. llvm-svn: 100814
Diffstat (limited to 'clang/test/Sema/decl-invalid.c')
-rw-r--r--clang/test/Sema/decl-invalid.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/Sema/decl-invalid.c b/clang/test/Sema/decl-invalid.c
index 815e6dd9ca5..f6fed3c92d0 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-error {{declaration does not declare anything}}
+typedef union <anonymous> __mbstate_t; // expected-error {{declaration of anonymous union must be a definition}} expected-warning {{declaration does not declare anything}}
// PR2017
@@ -13,12 +13,12 @@ int a() {
expected-error{{expected identifier or '('}}
}
-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}}
+int; // expected-warning {{declaration does not declare anything}}
+typedef int; // expected-warning {{declaration does not declare anything}}
+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;
-I; // expected-error {{declaration does not declare anything}}
+I; // expected-warning {{declaration does not declare anything}}
OpenPOWER on IntegriCloud