diff options
Diffstat (limited to 'test/Sema/decl-in-prototype.c')
-rw-r--r-- | test/Sema/decl-in-prototype.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/Sema/decl-in-prototype.c b/test/Sema/decl-in-prototype.c index 05b8e0a1c3bf..4f581aa54e53 100644 --- a/test/Sema/decl-in-prototype.c +++ b/test/Sema/decl-in-prototype.c @@ -1,12 +1,12 @@ -// RUN: %clang_cc1_only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s const int AA = 5; -int f1(enum {AA,BB} E) { +int f1(enum {AA,BB} E) { // expected-warning {{will not be visible outside of this function}} return BB; } -int f2(enum {AA=7,BB} E) { +int f2(enum {AA=7,BB} E) { // expected-warning {{will not be visible outside of this function}} return AA; } @@ -31,3 +31,7 @@ void f6(struct z {int b;} c) { // expected-warning {{declaration of 'struct z' w struct z d; d.b = 4; } + +void pr19018_1 (enum e19018 { qq } x); // expected-warning{{declaration of 'enum e19018' will not be visible outside of this function}} +enum e19018 qq; //expected-error{{tentative definition has type 'enum e19018' that is never completed}} \ + //expected-note{{forward declaration of 'enum e19018'}} |