[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 21 07:45:52 PST 2025
================
@@ -2203,6 +2203,12 @@ Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc,
return ParseCXXCondition(nullptr, Loc, CK, MissingOK);
}
+ EnterExpressionEvaluationContext Eval(
----------------
erichkeane wrote:
Right, I saw that/understand how that 'ShouldEnter' works. its just not clear to me that this is the correct place that the context should be introduced.
It isn't clear to me why it is introduced only for `Expression` and not an `InitStmtDecl` for example. And also why it should apply to the expression AND condition (on 2213 and 2221 respectively) but not the condition on 2203, etc.
https://github.com/llvm/llvm-project/pull/123667
More information about the cfe-commits
mailing list