summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-02-27 01:57:00 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-02-27 01:57:00 +0000
commitf81c2cc6ca4b728522e2d6755bfc3968167aff11 (patch)
tree22ed8ee64826f7c4f843cb3cee030d9b369f28e5 /clang/lib/Serialization
parent84d28de62707263fb926449227929525817f536c (diff)
downloadbcm5719-llvm-f81c2cc6ca4b728522e2d6755bfc3968167aff11.tar.gz
bcm5719-llvm-f81c2cc6ca4b728522e2d6755bfc3968167aff11.zip
[modules] For an inheriting constructor, the inherited constructor is stored in
a map keyed off the canonical declaration. Don't try to set it if we're loading some non-canonical merged declaration. llvm-svn: 230716
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r--clang/lib/Serialization/ASTReaderDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index a10ae1edf94..97e43b700b9 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -1611,7 +1611,8 @@ void ASTDeclReader::VisitCXXConstructorDecl(CXXConstructorDecl *D) {
VisitCXXMethodDecl(D);
if (auto *CD = ReadDeclAs<CXXConstructorDecl>(Record, Idx))
- D->setInheritedConstructor(CD);
+ if (D->isCanonicalDecl())
+ D->setInheritedConstructor(CD);
D->IsExplicitSpecified = Record[Idx++];
// FIXME: We should defer loading this until we need the constructor's body.
std::tie(D->CtorInitializers, D->NumCtorInitializers) =
OpenPOWER on IntegriCloud