Change the context correctly when instantiating a static data member definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125517 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CXX/class.access/p4.cpp b/test/CXX/class.access/p4.cpp
index e4e9ff0..a8a2ef9 100644
--- a/test/CXX/class.access/p4.cpp
+++ b/test/CXX/class.access/p4.cpp
@@ -498,3 +498,13 @@
     return !b;
   }
 }
+
+namespace test23 {
+  template <typename T> class A {
+    A();
+    static A instance;
+  };
+
+  template <typename T> A<T> A<T>::instance;
+  template class A<int>;
+}