Forgot the testcases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98685 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/warn-shadow.c b/test/Sema/warn-shadow.c
new file mode 100644
index 0000000..f75c140
--- /dev/null
+++ b/test/Sema/warn-shadow.c
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -verify -fsyntax-only -Wshadow %s
+
+int i;          // expected-note {{previous declaration is here}}
+
+void foo() {
+  int pass1;
+  int i;        // expected-warning {{declaration shadows a variable in the global scope}} \
+                // expected-note {{previous declaration is here}}
+  {
+    int pass2;
+    int i;      // expected-warning {{declaration shadows a local variable}} \
+                // expected-note {{previous declaration is here}}
+    {
+      int pass3;
+      int i;    // expected-warning {{declaration shadows a local variable}}
+    }
+  }
+
+  int __sync_fetch_and_add; // expected-warning {{declaration shadows a global built-in function}}
+}