@@ -18539,7 +18539,7 @@ MarkVarDeclODRUsed(ValueDecl *V, SourceLocation Loc, Sema &SemaRef,
1853918539 QualType CaptureType, DeclRefType;
1854018540 if (SemaRef.LangOpts.OpenMP)
1854118541 SemaRef.OpenMP().tryCaptureOpenMPLambdas(V);
18542- SemaRef.tryCaptureVariable(V, Loc, Sema::TryCapture_Implicit ,
18542+ SemaRef.tryCaptureVariable(V, Loc, TryCaptureKind::Implicit ,
1854318543 /*EllipsisLoc*/ SourceLocation(),
1854418544 /*BuildAndDiagnose*/ true, CaptureType,
1854518545 DeclRefType, FunctionScopeIndexToStopAt);
@@ -18844,12 +18844,12 @@ static bool captureInBlock(BlockScopeInfo *BSI, ValueDecl *Var,
1884418844static bool captureInCapturedRegion(
1884518845 CapturedRegionScopeInfo *RSI, ValueDecl *Var, SourceLocation Loc,
1884618846 const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType,
18847- const bool RefersToCapturedVariable, Sema:: TryCaptureKind Kind,
18848- bool IsTopScope, Sema &S, bool Invalid) {
18847+ const bool RefersToCapturedVariable, TryCaptureKind Kind, bool IsTopScope ,
18848+ Sema &S, bool Invalid) {
1884918849 // By default, capture variables by reference.
1885018850 bool ByRef = true;
18851- if (IsTopScope && Kind != Sema::TryCapture_Implicit ) {
18852- ByRef = (Kind == Sema::TryCapture_ExplicitByRef );
18851+ if (IsTopScope && Kind != TryCaptureKind::Implicit ) {
18852+ ByRef = (Kind == TryCaptureKind::ExplicitByRef );
1885318853 } else if (S.getLangOpts().OpenMP && RSI->CapRegionKind == CR_OpenMP) {
1885418854 // Using an LValue reference type is consistent with Lambdas (see below).
1885518855 if (S.OpenMP().isOpenMPCapturedDecl(Var)) {
@@ -18885,13 +18885,13 @@ static bool captureInLambda(LambdaScopeInfo *LSI, ValueDecl *Var,
1888518885 SourceLocation Loc, const bool BuildAndDiagnose,
1888618886 QualType &CaptureType, QualType &DeclRefType,
1888718887 const bool RefersToCapturedVariable,
18888- const Sema:: TryCaptureKind Kind,
18888+ const TryCaptureKind Kind,
1888918889 SourceLocation EllipsisLoc, const bool IsTopScope,
1889018890 Sema &S, bool Invalid) {
1889118891 // Determine whether we are capturing by reference or by value.
1889218892 bool ByRef = false;
18893- if (IsTopScope && Kind != Sema::TryCapture_Implicit ) {
18894- ByRef = (Kind == Sema::TryCapture_ExplicitByRef );
18893+ if (IsTopScope && Kind != TryCaptureKind::Implicit ) {
18894+ ByRef = (Kind == TryCaptureKind::ExplicitByRef );
1889518895 } else {
1889618896 ByRef = (LSI->ImpCaptureStyle == LambdaScopeInfo::ImpCap_LambdaByref);
1889718897 }
@@ -19169,7 +19169,7 @@ bool Sema::tryCaptureVariable(
1916919169 CaptureType = Var->getType();
1917019170 DeclRefType = CaptureType.getNonReferenceType();
1917119171 bool Nested = false;
19172- bool Explicit = (Kind != TryCapture_Implicit );
19172+ bool Explicit = (Kind != TryCaptureKind::Implicit );
1917319173 unsigned FunctionScopesIndex = MaxFunctionScopesIndex;
1917419174 do {
1917519175
@@ -19411,9 +19411,9 @@ bool Sema::tryCaptureVariable(ValueDecl *Var, SourceLocation Loc,
1941119411bool Sema::NeedToCaptureVariable(ValueDecl *Var, SourceLocation Loc) {
1941219412 QualType CaptureType;
1941319413 QualType DeclRefType;
19414- return !tryCaptureVariable(Var, Loc, TryCapture_Implicit, SourceLocation(),
19415- /*BuildAndDiagnose=*/false, CaptureType ,
19416- DeclRefType, nullptr);
19414+ return !tryCaptureVariable(
19415+ Var, Loc, TryCaptureKind::Implicit, SourceLocation() ,
19416+ /*BuildAndDiagnose=*/false, CaptureType, DeclRefType, nullptr);
1941719417}
1941819418
1941919419QualType Sema::getCapturedDeclRefType(ValueDecl *Var, SourceLocation Loc) {
@@ -19423,9 +19423,9 @@ QualType Sema::getCapturedDeclRefType(ValueDecl *Var, SourceLocation Loc) {
1942319423 QualType DeclRefType;
1942419424
1942519425 // Determine whether we can capture this variable.
19426- if (tryCaptureVariable(Var, Loc, TryCapture_Implicit , SourceLocation(),
19427- /*BuildAndDiagnose=*/false, CaptureType,
19428- DeclRefType, nullptr))
19426+ if (tryCaptureVariable(Var, Loc, TryCaptureKind::Implicit , SourceLocation(),
19427+ /*BuildAndDiagnose=*/false, CaptureType, DeclRefType,
19428+ nullptr))
1942919429 return QualType();
1943019430
1943119431 return DeclRefType;
@@ -20082,7 +20082,7 @@ static void DoMarkBindingDeclReferenced(Sema &SemaRef, SourceLocation Loc,
2008220082 OdrUseContext OdrUse = isOdrUseContext(SemaRef);
2008320083 if (OdrUse == OdrUseContext::Used) {
2008420084 QualType CaptureType, DeclRefType;
20085- SemaRef.tryCaptureVariable(BD, Loc, Sema::TryCapture_Implicit ,
20085+ SemaRef.tryCaptureVariable(BD, Loc, TryCaptureKind::Implicit ,
2008620086 /*EllipsisLoc*/ SourceLocation(),
2008720087 /*BuildAndDiagnose*/ true, CaptureType,
2008820088 DeclRefType,
0 commit comments