diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-01-08 14:58:32 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-01-08 14:58:32 +0000 |
commit | ef5ea1df4e65d7a885e77ed9b7a643b896de15a2 (patch) | |
tree | 7720e6806ef753edbce6cf456f0753d599707fbf /clang | |
parent | 7c85fde500b8e263d99f551f532267a28355b5bc (diff) | |
download | bcm5719-llvm-ef5ea1df4e65d7a885e77ed9b7a643b896de15a2.tar.gz bcm5719-llvm-ef5ea1df4e65d7a885e77ed9b7a643b896de15a2.zip |
Clear the LV cache when setting the instantiated from link.
Fixes pr14835.
llvm-svn: 171857
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 1 | ||||
-rw-r--r-- | clang/test/SemaCXX/visibility.cpp | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 426e67cc79a..dc398f36ecd 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -949,6 +949,7 @@ ASTContext::setInstantiatedFromStaticDataMember(VarDecl *Inst, VarDecl *Tmpl, "Already noted what static data member was instantiated from"); InstantiatedFromStaticDataMember[Inst] = new (*this) MemberSpecializationInfo(Tmpl, TSK, PointOfInstantiation); + Inst->ClearLVCache(); } FunctionDecl *ASTContext::getClassScopeSpecializationPattern( diff --git a/clang/test/SemaCXX/visibility.cpp b/clang/test/SemaCXX/visibility.cpp new file mode 100644 index 00000000000..434b3c06c1c --- /dev/null +++ b/clang/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; + } +} |