@@ -6212,11 +6212,10 @@ static bool CheckConvertedConstantConversions(Sema &S,
62126212/// converted constant expression of type T, perform the conversion but
62136213/// does not evaluate the expression
62146214static ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From,
6215- QualType T,
6216- Sema::CCEKind CCE,
6215+ QualType T, CCEKind CCE,
62176216 NamedDecl *Dest,
62186217 APValue &PreNarrowingValue) {
6219- assert((S.getLangOpts().CPlusPlus11 || CCE == Sema::CCEK_TempArgStrict ) &&
6218+ assert((S.getLangOpts().CPlusPlus11 || CCE == CCEKind::TempArgStrict ) &&
62206219 "converted constant expression outside C++11 or TTP matching");
62216220
62226221 if (checkPlaceholderForOverload(S, From))
@@ -6228,7 +6227,7 @@ static ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From,
62286227 // expression is a constant expression and the implicit conversion
62296228 // sequence contains only [... list of conversions ...].
62306229 ImplicitConversionSequence ICS =
6231- (CCE == Sema::CCEK_ExplicitBool || CCE == Sema::CCEK_Noexcept )
6230+ (CCE == CCEKind::ExplicitBool || CCE == CCEKind::Noexcept )
62326231 ? TryContextuallyConvertToBool(S, From)
62336232 : TryCopyInitialization(S, From, T,
62346233 /*SuppressUserConversions=*/false,
@@ -6287,7 +6286,7 @@ static ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From,
62876286 // class type.
62886287 ExprResult Result;
62896288 bool IsTemplateArgument =
6290- CCE == Sema::CCEK_TemplateArg || CCE == Sema::CCEK_TempArgStrict ;
6289+ CCE == CCEKind::TemplateArg || CCE == CCEKind::TempArgStrict ;
62916290 if (T->isRecordType()) {
62926291 assert(IsTemplateArgument &&
62936292 "unexpected class type converted constant expr");
@@ -6322,7 +6321,7 @@ static ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From,
63226321 break;
63236322
63246323 case NK_Constant_Narrowing:
6325- if (CCE == Sema::CCEK_ArrayBound &&
6324+ if (CCE == CCEKind::ArrayBound &&
63266325 PreNarrowingType->isIntegralOrEnumerationType() &&
63276326 PreNarrowingValue.isInt()) {
63286327 // Don't diagnose array bound narrowing here; we produce more precise
@@ -6340,7 +6339,7 @@ static ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From,
63406339 // value-dependent so we can't tell whether it's actually narrowing.
63416340 // For matching the parameters of a TTP, the conversion is ill-formed
63426341 // if it may narrow.
6343- if (CCE != Sema::CCEK_TempArgStrict )
6342+ if (CCE != CCEKind::TempArgStrict )
63446343 break;
63456344 [[fallthrough]];
63466345 case NK_Type_Narrowing:
@@ -6361,8 +6360,7 @@ static ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From,
63616360/// the converted expression, per C++11 [expr.const]p3.
63626361static ExprResult CheckConvertedConstantExpression(Sema &S, Expr *From,
63636362 QualType T, APValue &Value,
6364- Sema::CCEKind CCE,
6365- bool RequireInt,
6363+ CCEKind CCE, bool RequireInt,
63666364 NamedDecl *Dest) {
63676365
63686366 APValue PreNarrowingValue;
@@ -6406,7 +6404,7 @@ ExprResult Sema::CheckConvertedConstantExpression(Expr *From, QualType T,
64066404
64076405ExprResult
64086406Sema::EvaluateConvertedConstantExpression(Expr *E, QualType T, APValue &Value,
6409- Sema:: CCEKind CCE, bool RequireInt,
6407+ CCEKind CCE, bool RequireInt,
64106408 const APValue &PreNarrowingValue) {
64116409
64126410 ExprResult Result = E;
@@ -6415,12 +6413,12 @@ Sema::EvaluateConvertedConstantExpression(Expr *E, QualType T, APValue &Value,
64156413 Expr::EvalResult Eval;
64166414 Eval.Diag = &Notes;
64176415
6418- assert(CCE != Sema::CCEK_TempArgStrict && "unnexpected CCE Kind");
6416+ assert(CCE != CCEKind::TempArgStrict && "unnexpected CCE Kind");
64196417
64206418 ConstantExprKind Kind;
6421- if (CCE == Sema::CCEK_TemplateArg && T->isRecordType())
6419+ if (CCE == CCEKind::TemplateArg && T->isRecordType())
64226420 Kind = ConstantExprKind::ClassTemplateArgument;
6423- else if (CCE == Sema::CCEK_TemplateArg )
6421+ else if (CCE == CCEKind::TemplateArg )
64246422 Kind = ConstantExprKind::NonClassTemplateArgument;
64256423 else
64266424 Kind = ConstantExprKind::Normal;
0 commit comments