Fix a crash when referencing static data members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80835 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/static-data-member.cpp b/test/CodeGenCXX/static-data-member.cpp
new file mode 100644
index 0000000..6e2abcc
--- /dev/null
+++ b/test/CodeGenCXX/static-data-member.cpp
@@ -0,0 +1,8 @@
+// RUN: clang-cc -emit-llvm -o - %s
+struct S { 
+  static int i;
+};
+
+void f() { 
+  int a = S::i;
+}