Clear the LV cache when setting the instantiated from link.
Fixes pr14835. llvm-svn: 171857
This commit is contained in:
parent
7c85fde500
commit
ef5ea1df4e
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue