diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-28 23:09:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-28 23:09:46 +0000 |
commit | 120851d42c6bb4abd5c8b13de6e498216478610d (patch) | |
tree | dfc098b41acf5edb3b911349a5d16a655c9e71a2 /lib/Sema/TreeTransform.h | |
parent | a2b584af8864e3cb3bbce11cd50d682559cda7ff (diff) | |
download | clang-120851d42c6bb4abd5c8b13de6e498216478610d.tar.gz |
Defer creating fields for captures until we finish building the
capturing expression or statement.
No functionality change yet. The intent is that we will also delay
building the initialization expression until the enclosing context, so
that:
a) we build the initialization expression in the right context, and
b) we can elide captures that are not odr-used, as suggested by P0588R1.
This also consolidates some duplicated code building capture fields into
a single place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361893 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/TreeTransform.h')
-rw-r--r-- | lib/Sema/TreeTransform.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index b5114eeef3..6620885f23 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -11382,7 +11382,7 @@ TreeTransform<Derived>::TransformLambdaExpr(LambdaExpr *E) { break; } NewVDs.push_back(NewVD); - getSema().buildInitCaptureField(LSI, NewVD); + getSema().addInitCapture(LSI, NewVD); } if (Invalid) |