diff options
author | Vlad Serebrennikov <serebrennikov.vladislav@gmail.com> | 2025-05-02 09:29:08 +0300 |
---|---|---|
committer | Vlad Serebrennikov <serebrennikov.vladislav@gmail.com> | 2025-05-02 09:29:35 +0300 |
commit | 048befe9ef7edab3580a922d69664b21e2a532fa (patch) | |
tree | 77501f82ce679cf85672d0c23e732470134e4ff9 /clang/lib/Sema/SemaLambda.cpp | |
parent | be6497ff7583248d76a6710dd48cfeb63dd68f27 (diff) | |
download | llvm-048befe9ef7edab3580a922d69664b21e2a532fa.zip llvm-048befe9ef7edab3580a922d69664b21e2a532fa.tar.gz llvm-048befe9ef7edab3580a922d69664b21e2a532fa.tar.bz2 |
Revert "[clang][NFC] Convert `Sema::TryCaptureKind` to scoped enum"
This reverts commit be6497ff7583248d76a6710dd48cfeb63dd68f27.
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()) |