]> granicus.if.org Git - clang/commitdiff
Properly add chained template specializations.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 28 Oct 2010 07:38:47 +0000 (07:38 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 28 Oct 2010 07:38:47 +0000 (07:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117535 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTWriter.cpp

index 3e7667404d513362811d45894bff9a7cce15b452..283d086f0c7c4cd9478870f98fb89fcf4a66fe22 100644 (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.