Clear the LV cache when setting the instantiated from link.
Fixes pr14835.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171857 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/visibility.cpp b/test/SemaCXX/visibility.cpp
new file mode 100644
index 0000000..434b3c0
--- /dev/null
+++ b/test/SemaCXX/visibility.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only %s
+
+namespace test1 {
+ template <class C>
+ struct C2
+ {
+ static int p __attribute__((visibility("hidden")));
+ };
+ int f() {
+ return C2<int>::p;
+ }
+}