diff options
Diffstat (limited to 'test/Sema/warn-shadow.c')
-rw-r--r-- | test/Sema/warn-shadow.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Sema/warn-shadow.c b/test/Sema/warn-shadow.c index a112210c9693..32aca8d612b2 100644 --- a/test/Sema/warn-shadow.c +++ b/test/Sema/warn-shadow.c @@ -48,3 +48,14 @@ void test4(int i) { // expected-warning {{declaration shadows a variable in the void test5(int i); void test6(void (*f)(int i)) {} void test7(void *context, void (*callback)(void *context)) {} + +extern int bob; // expected-note {{previous declaration is here}} + +// rdar://8883302 +void rdar8883302() { + extern int bob; // don't warn for shadowing. +} + +void test8() { + int bob; // expected-warning {{declaration shadows a variable in the global scope}} +} |