Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
katzdm opened this issue Jan 17, 2025 · 0 comments
Open

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

katzdm opened this issue Jan 17, 2025 · 0 comments
Labels
clang Clang issues not falling into any other category

Comments

@katzdm
Copy link
Contributor

katzdm commented Jan 17, 2025

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

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

No branches or pull requests

2 participants