From 0f04f69acd0a86ff78961933c13fe5aeda94e1b6 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 28 Oct 2010 07:38:47 +0000 Subject: [PATCH] Properly add chained template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117535 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Serialization/ASTWriter.cpp | 2 ++ 1 file changed, 2 insertions(+) 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. -- 2.40.0