From 120851d42c6bb4abd5c8b13de6e498216478610d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 28 May 2019 23:09:46 +0000 Subject: 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 --- lib/Sema/TreeTransform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Sema/TreeTransform.h') 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::TransformLambdaExpr(LambdaExpr *E) { break; } NewVDs.push_back(NewVD); - getSema().buildInitCaptureField(LSI, NewVD); + getSema().addInitCapture(LSI, NewVD); } if (Invalid) -- cgit v1.2.1