diff options
Diffstat (limited to 'clang/lib/Sema/SemaLambda.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLambda.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp index 28fcef8..1183a04 100644 --- a/clang/lib/Sema/SemaLambda.cpp +++ b/clang/lib/Sema/SemaLambda.cpp @@ -207,12 +207,13 @@ UnsignedOrNone clang::getStackIndexOfNearestEnclosingCaptureCapableLambda( // checking whether all enclosing lambdas of the capture-ready lambda allow // the capture - i.e. make sure it is capture-capable. QualType CaptureType, DeclRefType; - const bool CanCaptureVariable = !S.tryCaptureVariable( - VarToCapture, - /*ExprVarIsUsedInLoc*/ SourceLocation(), TryCaptureKind::Implicit, - /*EllipsisLoc*/ SourceLocation(), - /*BuildAndDiagnose*/ false, CaptureType, DeclRefType, - &IndexOfCaptureReadyLambda); + const bool CanCaptureVariable = + !S.tryCaptureVariable(VarToCapture, + /*ExprVarIsUsedInLoc*/ SourceLocation(), + clang::Sema::TryCapture_Implicit, + /*EllipsisLoc*/ SourceLocation(), + /*BuildAndDiagnose*/ false, CaptureType, + DeclRefType, &IndexOfCaptureReadyLambda); if (!CanCaptureVariable) return NoLambdaIsCaptureCapable; } else { @@ -1347,9 +1348,8 @@ void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, if (C->Init.isUsable()) { addInitCapture(LSI, cast<VarDecl>(Var), C->Kind == LCK_ByRef); } else { - TryCaptureKind Kind = C->Kind == LCK_ByRef - ? TryCaptureKind::ExplicitByRef - : TryCaptureKind::ExplicitByVal; + TryCaptureKind Kind = C->Kind == LCK_ByRef ? TryCapture_ExplicitByRef + : TryCapture_ExplicitByVal; tryCaptureVariable(Var, C->Loc, Kind, EllipsisLoc); } if (!LSI->Captures.empty()) |