Properly add chained template specializations.

llvm-svn: 117535
This commit is contained in:
Argyrios Kyrtzidis 2010-10-28 07:38:47 +00:00
parent 4729972c0f
commit ef80a01d04
1 changed files with 2 additions and 0 deletions

View File

@ -3323,6 +3323,8 @@ void ASTWriter::AddedCXXImplicitMember(const CXXRecordDecl *RD, const Decl *D) {
void ASTWriter::AddedCXXTemplateSpecialization(const ClassTemplateDecl *TD,
const ClassTemplateSpecializationDecl *D) {
// The specializations set is kept in the canonical template.
TD = TD->getCanonicalDecl();
if (!(D->getPCHLevel() == 0 && TD->getPCHLevel() > 0))
return; // Not a source specialization added to a template from PCH.