@@ -648,6 +648,11 @@ enum class TrivialABIHandling {
648648
649649enum class TryCaptureKind { Implicit, ExplicitByVal, ExplicitByRef };
650650
651+ enum class AllowFoldKind {
652+ No,
653+ Allow,
654+ };
655+
651656/// Sema - This implements semantic analysis and AST building for C.
652657/// \nosubgrouping
653658class Sema final : public SemaBase {
@@ -7424,25 +7429,23 @@ class Sema final : public SemaBase {
74247429 virtual ~VerifyICEDiagnoser() {}
74257430 };
74267431
7427- enum AllowFoldKind {
7428- NoFold,
7429- AllowFold,
7430- };
7431-
74327432 /// VerifyIntegerConstantExpression - Verifies that an expression is an ICE,
74337433 /// and reports the appropriate diagnostics. Returns false on success.
74347434 /// Can optionally return the value of the expression.
7435- ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
7436- VerifyICEDiagnoser &Diagnoser,
7437- AllowFoldKind CanFold = NoFold);
7438- ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
7439- unsigned DiagID,
7440- AllowFoldKind CanFold = NoFold);
7441- ExprResult VerifyIntegerConstantExpression(Expr *E,
7442- llvm::APSInt *Result = nullptr,
7443- AllowFoldKind CanFold = NoFold);
7444- ExprResult VerifyIntegerConstantExpression(Expr *E,
7445- AllowFoldKind CanFold = NoFold) {
7435+ ExprResult
7436+ VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
7437+ VerifyICEDiagnoser &Diagnoser,
7438+ AllowFoldKind CanFold = AllowFoldKind::No);
7439+ ExprResult
7440+ VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result,
7441+ unsigned DiagID,
7442+ AllowFoldKind CanFold = AllowFoldKind::No);
7443+ ExprResult
7444+ VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result = nullptr,
7445+ AllowFoldKind CanFold = AllowFoldKind::No);
7446+ ExprResult
7447+ VerifyIntegerConstantExpression(Expr *E,
7448+ AllowFoldKind CanFold = AllowFoldKind::No) {
74467449 return VerifyIntegerConstantExpression(E, nullptr, CanFold);
74477450 }
74487451
0 commit comments