diff options
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r-- | clang/lib/Frontend/PCHReaderDecl.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Frontend/PCHWriterDecl.cpp | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PCHReaderDecl.cpp b/clang/lib/Frontend/PCHReaderDecl.cpp index be4f72ec3b7..1a1f23fc49e 100644 --- a/clang/lib/Frontend/PCHReaderDecl.cpp +++ b/clang/lib/Frontend/PCHReaderDecl.cpp @@ -248,12 +248,14 @@ void PCHDeclReader::VisitFunctionDecl(FunctionDecl *FD) { LAngleLoc = Reader.ReadSourceLocation(Record, Idx); RAngleLoc = Reader.ReadSourceLocation(Record, Idx); } + + SourceLocation POI = Reader.ReadSourceLocation(Record, Idx); FD->setFunctionTemplateSpecialization(Template, TemplArgs.size(), TemplArgs.data(), TSK, TemplArgLocs.size(), TemplArgLocs.data(), - LAngleLoc, RAngleLoc); + LAngleLoc, RAngleLoc, POI); break; } case FunctionDecl::TK_DependentFunctionTemplateSpecialization: { @@ -268,6 +270,8 @@ void PCHDeclReader::VisitFunctionDecl(FunctionDecl *FD) { unsigned NumArgs = Record[Idx++]; while (NumArgs--) TemplArgs.addArgument(Reader.ReadTemplateArgumentLoc(Record, Idx)); + TemplArgs.setLAngleLoc(Reader.ReadSourceLocation(Record, Idx)); + TemplArgs.setRAngleLoc(Reader.ReadSourceLocation(Record, Idx)); FD->setDependentTemplateSpecialization(*Reader.getContext(), TemplDecls, TemplArgs); diff --git a/clang/lib/Frontend/PCHWriterDecl.cpp b/clang/lib/Frontend/PCHWriterDecl.cpp index deca4b22ec6..9f7264ede18 100644 --- a/clang/lib/Frontend/PCHWriterDecl.cpp +++ b/clang/lib/Frontend/PCHWriterDecl.cpp @@ -249,6 +249,8 @@ void PCHDeclWriter::VisitFunctionDecl(FunctionDecl *D) { Writer.AddSourceLocation(FTSInfo->TemplateArgumentsAsWritten->getRAngleLoc(), Record); } + + Writer.AddSourceLocation(FTSInfo->getPointOfInstantiation(), Record); break; } case FunctionDecl::TK_DependentFunctionTemplateSpecialization: { @@ -264,6 +266,8 @@ void PCHDeclWriter::VisitFunctionDecl(FunctionDecl *D) { Record.push_back(DFTSInfo->getNumTemplateArgs()); for (int i=0, e = DFTSInfo->getNumTemplateArgs(); i != e; ++i) Writer.AddTemplateArgumentLoc(DFTSInfo->getTemplateArg(i), Record); + Writer.AddSourceLocation(DFTSInfo->getLAngleLoc(), Record); + Writer.AddSourceLocation(DFTSInfo->getRAngleLoc(), Record); break; } } |