-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Front-end crashes when __PRETTY_FUNCTION__
(or __FUNCSIG__
) appears in trailing return type
#121274
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
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
lambda
C++11 lambda expressions
Comments
__PRETTY_FUNCTION__
(or __FUNCSIG__
) appears in trailing return type
@llvm/issue-subscribers-clang-frontend Author: Han Jiang (jhcarl0814)
On Compiler Explorer `clang` crashes when `__PRETTY_FUNCTION__` appears in trailing return type. On my computer `clangcl.exe` crashes when `__FUNCSIG__` appears in trailing return type.
Compiler Explorer, x64-64 clang (trunk), -std=c++26 -O2 -Wall -pedantic -pthread: int main()
{
[]() -> decltype(static_cast<char const*>(__PRETTY_FUNCTION__)) { return nullptr; };
} Could not execute the program
|
cor3ntin
pushed a commit
that referenced
this issue
Jan 12, 2025
…cl) appears in the trailing return type of the lambda (#122611) The (function) type of the lambda function is null while parsing trailing return type. The type is filled-in when the lambda body is entered. So, resolving `__PRETTY_FUNCTION__` before the lambda body is entered causes the crash. Fixes #121274.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
lambda
C++11 lambda expressions
On Compiler Explorer
clang
crashes when__PRETTY_FUNCTION__
appears in trailing return type. On my computerclang-cl.exe
crashes when__FUNCSIG__
appears in trailing return type.Compiler Explorer, x64-64 clang (trunk), -std=c++26 -O2 -Wall -pedantic -pthread:
Could not execute the program
Build failed
Compiler returned: 254
Compiler stderr
The text was updated successfully, but these errors were encountered: