================ @@ -1931,15 +1931,13 @@ Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, return ParseCXXCondition(nullptr, Loc, CK, MissingOK); } - ExprResult Expr = [&] { - EnterExpressionEvaluationContext Eval( - Actions, Sema::ExpressionEvaluationContext::ConstantEvaluated, - /*LambdaContextDecl=*/nullptr, - /*ExprContext=*/Sema::ExpressionEvaluationContextRecord::EK_Other, - /*ShouldEnter=*/CK == Sema::ConditionKind::ConstexprIf); - // Parse the expression. - return ParseExpression(); // expression - }(); + EnterExpressionEvaluationContext Eval( ---------------- erichkeane wrote:
Oh wait, `ParseCXXCondition` is recursive here, right? So it WILL cover the ParseCXXCondition on line 1949? Is it problematic in the init-statement that we would have TWO eval contexts (1 for init + conditon, and 1 for just condition)? https://github.com/llvm/llvm-project/pull/146890 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits