diff options
Diffstat (limited to 'test/Sema')
-rw-r--r-- | test/Sema/anonymous-struct-union.c | 10 | ||||
-rw-r--r-- | test/Sema/decl-invalid.c | 12 | ||||
-rw-r--r-- | test/Sema/declspec.c | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/test/Sema/anonymous-struct-union.c b/test/Sema/anonymous-struct-union.c index 78995a993a..118854fd47 100644 --- a/test/Sema/anonymous-struct-union.c +++ b/test/Sema/anonymous-struct-union.c @@ -50,12 +50,12 @@ struct Redecl { void zz(); // expected-error{{duplicate member 'zz'}} }; -union { // expected-error{{declaration does not declare anything}} +union { // expected-warning{{declaration does not declare anything}} int int_val; float float_val; }; -static union { // expected-error{{declaration does not declare anything}} +static union { // expected-warning{{declaration does not declare anything}} int int_val2; float float_val2; }; @@ -66,7 +66,7 @@ void f() { } void g() { - union { // expected-error{{declaration does not declare anything}} + union { // expected-warning{{declaration does not declare anything}} int i; float f2; }; @@ -78,7 +78,7 @@ void g() { struct s0 { union { int f0; }; }; // <rdar://problem/6481130> -typedef struct { }; // expected-error{{declaration does not declare anything}} +typedef struct { }; // expected-warning{{declaration does not declare anything}} // PR3675 struct s1 { @@ -89,7 +89,7 @@ struct s1 { }; // PR3680 -struct {}; // expected-error{{declaration does not declare anything}} +struct {}; // expected-warning{{declaration does not declare anything}} struct s2 { union { diff --git a/test/Sema/decl-invalid.c b/test/Sema/decl-invalid.c index 815e6dd9ca..f6fed3c92d 100644 --- a/test/Sema/decl-invalid.c +++ b/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}} diff --git a/test/Sema/declspec.c b/test/Sema/declspec.c index 1c87a0e21c..7354028cba 100644 --- a/test/Sema/declspec.c +++ b/test/Sema/declspec.c @@ -10,7 +10,7 @@ int typedef validTypeDecl() { } // expected-error {{function definition declared struct _zend_module_entry { } // expected-error {{expected ';' after struct}} int gv1; typedef struct _zend_function_entry { } // expected-error {{expected ';' after struct}} \ - // expected-error {{declaration does not declare anything}} + // expected-warning {{declaration does not declare anything}} int gv2; static void buggy(int *x) { } |