================
@@ -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:
Ah, I see! Though, this covers the `InitStmt`/`ParseCXXCondition` as well. It
isn't 100% clear to me what THAT does here (looks like it is for an init
statement?). I wonder if this doesn't cover that right. I would imagine the
eval context THEN needs to cover the condition after that?
https://github.com/llvm/llvm-project/pull/146890
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits