diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-07-01 23:19:58 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-07-01 23:19:58 +0000 |
commit | da6c234c39e6ddf3b1122f7add35972167e13c09 (patch) | |
tree | e78afdd5bb6aa1e4b7dba75195ef79d4146ef01f /clang/lib/Serialization/ASTReaderDecl.cpp | |
parent | 9729fb33156d3a6cbe7e55a389ac7dd501cc9dfe (diff) | |
download | bcm5719-llvm-da6c234c39e6ddf3b1122f7add35972167e13c09.tar.gz bcm5719-llvm-da6c234c39e6ddf3b1122f7add35972167e13c09.zip |
[modules] Merging support for specializations of a function template. This very
rarely matters, but can affect whether two dependent types are canonically
equivalent.
llvm-svn: 241207
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index c89140dcaf2..b23c33c5518 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -810,14 +810,14 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) { FunctionTemplateSpecializationInfo::Profile(ID, TemplArgs, C); void *InsertPos = nullptr; FunctionTemplateDecl::Common *CommonPtr = CanonTemplate->getCommonPtr(); - CommonPtr->Specializations.FindNodeOrInsertPos(ID, InsertPos); + FunctionTemplateSpecializationInfo *ExistingInfo = + CommonPtr->Specializations.FindNodeOrInsertPos(ID, InsertPos); if (InsertPos) CommonPtr->Specializations.InsertNode(FTInfo, InsertPos); else { assert(Reader.getContext().getLangOpts().Modules && "already deserialized this template specialization"); - // FIXME: This specialization is a redeclaration of one from another - // module. Merge it. + mergeRedeclarable(FD, ExistingInfo->Function, Redecl); } } break; @@ -839,8 +839,8 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) { FD->setDependentTemplateSpecialization(Reader.getContext(), TemplDecls, TemplArgs); - - // FIXME: Merging. + // These are not merged; we don't need to merge redeclarations of dependent + // template friends. break; } } |