summaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTWriterDecl.cpp
diff options
context:
space:
mode:
authorAxel Naumann <Axel.Naumann@cern.ch>2012-10-01 07:34:47 +0000
committerAxel Naumann <Axel.Naumann@cern.ch>2012-10-01 07:34:47 +0000
commit7b3b95a9485059b196896accc0144fd0bc31ff2c (patch)
tree0d6adb5d7bc6c15b37cdb37e398312c85a08b7ef /lib/Serialization/ASTWriterDecl.cpp
parent6cacae8bf9597b8124cd40aedc189c04484e1990 (diff)
downloadclang-7b3b95a9485059b196896accc0144fd0bc31ff2c.tar.gz
clang-7b3b95a9485059b196896accc0144fd0bc31ff2c.tar.bz2
clang-7b3b95a9485059b196896accc0144fd0bc31ff2c.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r--lib/Serialization/ASTWriterDecl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp
index 7122bca969..0f9bb3824b 100644
--- a/lib/Serialization/ASTWriterDecl.cpp
+++ b/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.