diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-03-26 22:22:22 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-03-26 22:22:22 +0000 |
commit | 36e25f4771819eb0ddd94dd9dd94cc0f927828d5 (patch) | |
tree | 583e17a4e67f3b72c1f800312b3741a50f06d3ee /clang/lib/Serialization/ASTReaderDecl.cpp | |
parent | b051389f049bc195877077430a1300fd3fc75582 (diff) | |
download | bcm5719-llvm-36e25f4771819eb0ddd94dd9dd94cc0f927828d5.tar.gz bcm5719-llvm-36e25f4771819eb0ddd94dd9dd94cc0f927828d5.zip |
[Modules] Fix tiny bug where we failed to get the canonical decl when
deserializing an inherited constructor.
This is the exact same logic we use when deserializing method overrides
for the same reason: the canonical decl may end up pinned to a different
decl when we are improting modules, we need to re-pin to the canonical
one during reading.
My test case for this will come in a subsequent commit. I was trying to
test a more tricky bug fix and the test case happened to tickle this bug
as well.
llvm-svn: 233325
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index 184e6d7772a..3499c8ea488 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -1628,7 +1628,7 @@ void ASTDeclReader::VisitCXXConstructorDecl(CXXConstructorDecl *D) { if (auto *CD = ReadDeclAs<CXXConstructorDecl>(Record, Idx)) if (D->isCanonicalDecl()) - D->setInheritedConstructor(CD); + D->setInheritedConstructor(CD->getCanonicalDecl()); D->IsExplicitSpecified = Record[Idx++]; } |