Fix a bug where an explicit instantiation declaration of a class template
specialization would make us think it might have a key function. llvm-svn: 204686
This commit is contained in:
@@ -1957,10 +1957,11 @@ static const CXXMethodDecl *computeKeyFunction(ASTContext &Context,
|
||||
if (!RD->isExternallyVisible())
|
||||
return 0;
|
||||
|
||||
// Template instantiations don't have key functions,see Itanium C++ ABI 5.2.6.
|
||||
// Template instantiations don't have key functions per Itanium C++ ABI 5.2.6.
|
||||
// Same behavior as GCC.
|
||||
TemplateSpecializationKind TSK = RD->getTemplateSpecializationKind();
|
||||
if (TSK == TSK_ImplicitInstantiation ||
|
||||
TSK == TSK_ExplicitInstantiationDeclaration ||
|
||||
TSK == TSK_ExplicitInstantiationDefinition)
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user