[clang++] Functions aren't marked immediate-escalating #123405
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
confirmed
Verified by a second party
consteval
C++20 consteval
https://godbolt.org/z/rvMWrhhYs
It seems that
PopExpressionEvaluationContext
, which triggers the marking of expressions as immediate-escalating, is performed after the check for whether the function body contains an immediate-escalating expression. Consequently, immediate-escalating functions (i.e., lambdas and constexpr function template specializations) that contain a reference to a consteval function are never marked as immediate.The RAII object whose teardown invokes
PopExpressionEvaluationContext
is here, whereas the call that checks whether the function body contains an immediate-escalating expression is here (a few lines later, but within scope of the RAII guard).The text was updated successfully, but these errors were encountered: