From a31dee2e04da90852e03628ca80949b992d4eabd Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Mon, 1 Oct 2012 07:34:47 +0000 Subject: Bring ASTReader and Writer into sync for the case where a canonical template specialization was written, which is non-canonical at the time of reading: force the reading of the ClassTemplateDecl if it was written. The easiest way out is to store whether the decl was canonical at the time of writing. Add test. llvm-svn: 164927 --- clang/lib/Serialization/ASTWriterDecl.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp') diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp index 7122bca9699..0f9bb3824b8 100644 --- a/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/clang/lib/Serialization/ASTWriterDecl.cpp @@ -1106,6 +1106,7 @@ void ASTDeclWriter::VisitClassTemplateSpecializationDecl( Writer.AddTemplateArgumentList(&D->getTemplateArgs(), Record); Writer.AddSourceLocation(D->getPointOfInstantiation(), Record); Record.push_back(D->getSpecializationKind()); + Record.push_back(D->isCanonicalDecl()); if (D->isCanonicalDecl()) { // When reading, we'll add it to the folding set of the following template. -- cgit v1.2.3