summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLambda.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-10-19 19:01:34 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-10-19 19:01:34 +0000
commitb3d203ff7f308cc5675f095654d0cda905bf95bf (patch)
tree827f58b9968e6a725ea2d02434ceea1869981c9b /clang/lib/Sema/SemaLambda.cpp
parent36f62c066a8cd97a0b3459eec11d929ec875c941 (diff)
downloadbcm5719-llvm-b3d203ff7f308cc5675f095654d0cda905bf95bf.tar.gz
bcm5719-llvm-b3d203ff7f308cc5675f095654d0cda905bf95bf.zip
PR24164, PR39336: init-captures are not distinct full-expressions.
Rather, they are subexpressions of the enclosing lambda-expression, and any temporaries in them are destroyed at the end of that full-expression, or when the corresponding lambda-expression is destroyed if they are lifetime-extended. llvm-svn: 344801
Diffstat (limited to 'clang/lib/Sema/SemaLambda.cpp')
-rw-r--r--clang/lib/Sema/SemaLambda.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp
index 8000cb4fbfd..803b253e458 100644
--- a/clang/lib/Sema/SemaLambda.cpp
+++ b/clang/lib/Sema/SemaLambda.cpp
@@ -775,16 +775,6 @@ QualType Sema::buildLambdaInitCaptureInitialization(SourceLocation Loc,
if (Result.isInvalid())
return QualType();
- Init = Result.getAs<Expr>();
-
- // The init-capture initialization is a full-expression that must be
- // processed as one before we enter the declcontext of the lambda's
- // call-operator.
- Result = ActOnFinishFullExpr(Init, Loc, /*DiscardedValue*/ false,
- /*IsConstexpr*/ false,
- /*IsLambdaInitCaptureInitializer*/ true);
- if (Result.isInvalid())
- return QualType();
Init = Result.getAs<Expr>();
return DeducedType;
OpenPOWER on IntegriCloud