diff options
author | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
commit | 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch) | |
tree | a9243275843fbeaa590afc07ee888e006b8d54ea /test/Sema/warn-shadow.c | |
parent | 69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff) | |
download | FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz |
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
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 a112210..32aca8d 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}} +} |