-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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] (Presumably) CTAD and consteval constructors in more than one class cause segfault #54587
Labels
c++20
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
consteval
C++20 consteval
crash
Prefer [crash-on-valid] or [crash-on-invalid]
Comments
cjdb
added
the
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
label
Mar 27, 2022
@llvm/issue-subscribers-clang-frontend |
@cor3ntin suggested that this might be a triplicate issue. After a bit of chatting, we realised that there's both an unevaluated lambda problem that's seemingly related. This problem is to do with |
usx95
added
c++20
crash
Prefer [crash-on-valid] or [crash-on-invalid]
consteval
C++20 consteval
labels
Aug 20, 2022
@llvm/issue-subscribers-c-20 |
usx95
added a commit
to usx95/llvm-project
that referenced
this issue
Sep 6, 2022
…l fns. As discussed in this [comment](llvm#56183 (comment)), we end up building the lambda twice: once while parsing the function calls and then again while handling the immediate invocation. This happens specially during removing nested immediate invocation. Eg: When we have another consteval function as the parameter along with this lambda expression. Eg: `foo(bar([]{}))`, `foo(bar(), []{})` While removing such nested immediate invocations, we should not rebuild this lambda. (IIUC, rebuilding a lambda would always generate a new type which will never match the original type from parsing) Fixes: llvm#56183 Fixes: llvm#51695 Fixes: llvm#50455 Fixes: llvm#54872 Fixes: llvm#54587 Differential Revision: https://reviews.llvm.org/D132945 (cherry picked from commit e7eec38)
tru
pushed a commit
to llvm/llvm-project-release-prs
that referenced
this issue
Sep 8, 2022
…l fns. As discussed in this [comment](llvm/llvm-project#56183 (comment)), we end up building the lambda twice: once while parsing the function calls and then again while handling the immediate invocation. This happens specially during removing nested immediate invocation. Eg: When we have another consteval function as the parameter along with this lambda expression. Eg: `foo(bar([]{}))`, `foo(bar(), []{})` While removing such nested immediate invocations, we should not rebuild this lambda. (IIUC, rebuilding a lambda would always generate a new type which will never match the original type from parsing) Fixes: llvm/llvm-project#56183 Fixes: llvm/llvm-project#51695 Fixes: llvm/llvm-project#50455 Fixes: llvm/llvm-project#54872 Fixes: llvm/llvm-project#54587 Differential Revision: https://reviews.llvm.org/D132945 (cherry picked from commit e7eec38)
mem-frob
pushed a commit
to draperlaboratory/hope-llvm-project
that referenced
this issue
Oct 7, 2022
…l fns. As discussed in this [comment](llvm/llvm-project#56183 (comment)), we end up building the lambda twice: once while parsing the function calls and then again while handling the immediate invocation. This happens specially during removing nested immediate invocation. Eg: When we have another consteval function as the parameter along with this lambda expression. Eg: `foo(bar([]{}))`, `foo(bar(), []{})` While removing such nested immediate invocations, we should not rebuild this lambda. (IIUC, rebuilding a lambda would always generate a new type which will never match the original type from parsing) Fixes: llvm/llvm-project#56183 Fixes: llvm/llvm-project#51695 Fixes: llvm/llvm-project#50455 Fixes: llvm/llvm-project#54872 Fixes: llvm/llvm-project#54587 Differential Revision: https://reviews.llvm.org/D132945 (cherry picked from commit e7eec38246560781e0a4020b19c7eb038a8c5655)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c++20
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
consteval
C++20 consteval
crash
Prefer [crash-on-valid] or [crash-on-invalid]
Clang and system details
Clang installed from https://apt.llvm.org.
Minimal repro
Godbolt
Note that deleting one
hello
xorworld
will result in successful compilation.Diagnostic
fail-4786e0.cpp.txt
fail-4786e0.sh.txt
Files suffixed with
.txt
to avoid GitHub rejecting them.The text was updated successfully, but these errors were encountered: