Skip to content

[clang++] Functions aren't marked immediate-escalating #123405

@katzdm

Description

@katzdm

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).

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyconstevalC++20 consteval

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions