summaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTReaderDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-05-25 01:04:17 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-05-25 01:04:17 +0000
commit962d736d3cb56511d5f2f0d6a0444115694b395f (patch)
tree580ff1f5ff3705d9f3bc431f1e30070ad888434f /lib/Serialization/ASTReaderDecl.cpp
parent7628a031ad1d4fe42699e851a911b465c7c47ef0 (diff)
downloadclang-962d736d3cb56511d5f2f0d6a0444115694b395f.tar.gz
Permit static local structured bindings to be named from arbitrary scopes inside their declaring scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r--lib/Serialization/ASTReaderDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp
index 27fcc9e40b..5d40b85b03 100644
--- a/lib/Serialization/ASTReaderDecl.cpp
+++ b/lib/Serialization/ASTReaderDecl.cpp
@@ -1459,8 +1459,10 @@ void ASTDeclReader::VisitParmVarDecl(ParmVarDecl *PD) {
void ASTDeclReader::VisitDecompositionDecl(DecompositionDecl *DD) {
VisitVarDecl(DD);
auto **BDs = DD->getTrailingObjects<BindingDecl *>();
- for (unsigned I = 0; I != DD->NumBindings; ++I)
+ for (unsigned I = 0; I != DD->NumBindings; ++I) {
BDs[I] = ReadDeclAs<BindingDecl>();
+ BDs[I]->setDecomposedDecl(DD);
+ }
}
void ASTDeclReader::VisitBindingDecl(BindingDecl *BD) {