diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-08-12 00:39:32 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-08-12 00:39:32 +0000 |
commit | dca60b495822a869c08b9973e4c485a83e8b6c0e (patch) | |
tree | 2fdde29c41a18a0db2b21eee23a45ddf8a6fc75c /clang/lib/Sema/SemaDecl.cpp | |
parent | e5cc668eb823dc8eb0e6013289846d25b6e82293 (diff) | |
download | bcm5719-llvm-dca60b495822a869c08b9973e4c485a83e8b6c0e.tar.gz bcm5719-llvm-dca60b495822a869c08b9973e4c485a83e8b6c0e.zip |
P0217R3: Constant expression evaluation for decomposition declarations.
llvm-svn: 278447
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 4a68d60a1e2..6445dac7db0 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -6107,9 +6107,12 @@ NamedDecl *Sema::ActOnVariableDeclarator( NewVD = cast<VarDecl>(Res.get()); AddToScope = false; } else if (D.isDecompositionDeclarator()) { - NewVD = DecompositionDecl::Create(Context, DC, D.getLocStart(), - D.getIdentifierLoc(), R, TInfo, SC, - Bindings); + auto *NewDD = DecompositionDecl::Create(Context, DC, D.getLocStart(), + D.getIdentifierLoc(), R, TInfo, + SC, Bindings); + for (auto *B : Bindings) + B->setDecompositionDecl(NewDD); + NewVD = NewDD; } else NewVD = VarDecl::Create(Context, DC, D.getLocStart(), D.getIdentifierLoc(), II, R, TInfo, SC); |