Clear the LV cache when setting the instantiated from link.

Fixes pr14835.

llvm-svn: 171857
This commit is contained in:
Rafael Espindola 2013-01-08 14:58:32 +00:00
parent 7c85fde500
commit ef5ea1df4e
2 changed files with 13 additions and 0 deletions

View File

@ -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(

View File

@ -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;
}
}