summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReaderDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-07-01 23:19:58 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-07-01 23:19:58 +0000
commitda6c234c39e6ddf3b1122f7add35972167e13c09 (patch)
treee78afdd5bb6aa1e4b7dba75195ef79d4146ef01f /clang/lib/Serialization/ASTReaderDecl.cpp
parent9729fb33156d3a6cbe7e55a389ac7dd501cc9dfe (diff)
downloadbcm5719-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.cpp10
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;
}
}
OpenPOWER on IntegriCloud