From: Argyrios Kyrtzidis Date: Thu, 28 Oct 2010 07:38:47 +0000 (+0000) Subject: Properly add chained template specializations. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f04f69acd0a86ff78961933c13fe5aeda94e1b6;p=clang Properly add chained template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117535 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index 3e7667404d..283d086f0c 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -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.