diff options
Diffstat (limited to 'test/Sema/warn-shadow.c')
-rw-r--r-- | test/Sema/warn-shadow.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Sema/warn-shadow.c b/test/Sema/warn-shadow.c index 32aca8d612b21..aa8505b0c9172 100644 --- a/test/Sema/warn-shadow.c +++ b/test/Sema/warn-shadow.c @@ -59,3 +59,15 @@ void rdar8883302() { void test8() { int bob; // expected-warning {{declaration shadows a variable in the global scope}} } + +enum PR24718_1{pr24718}; // expected-note {{previous declaration is here}} +void PR24718(void) { + enum PR24718_2{pr24718}; // expected-warning {{declaration shadows a variable in the global scope}} +} + +struct PR24718_3; +struct PR24718_4 { + enum { + PR24718_3 // Does not shadow a type. + }; +}; |