Fix the diagnostic when we are shadowing an external variable and there exists a locally scoped extern with the same name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124580 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/warn-shadow.c b/test/Sema/warn-shadow.c
index c77bb0c..32aca8d 100644
--- a/test/Sema/warn-shadow.c
+++ b/test/Sema/warn-shadow.c
@@ -49,8 +49,13 @@
 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
-extern int bob;
 void rdar8883302() {
   extern int bob; // don't warn for shadowing.
 }
+
+void test8() {
+  int bob; // expected-warning {{declaration shadows a variable in the global scope}}
+}