Add a more reliable check for whether a static declaration has already 
been used.  In preparation for the fix to PR2360, but also a minor bug 
in its own right.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51583 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/static-forward-decl.c b/test/CodeGen/static-forward-decl.c
new file mode 100644
index 0000000..8e0825c
--- /dev/null
+++ b/test/CodeGen/static-forward-decl.c
@@ -0,0 +1,5 @@
+// RUN: clang %s -emit-llvm -o - -triple=i686-apple-darwin9 | grep "global i32 10"
+
+static int i;
+int*j=&i;
+static int i = 10;