-
Notifications
You must be signed in to change notification settings - Fork 11k
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]: clang crashed with Assertion 'idx < size()' failed
in clang::Sema::tryCaptureVariable
when try to capture variable with function parameter scope in a trailing noexcept expression
#97453
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
confirmed
Verified by a second party
crash
Prefer [crash-on-valid] or [crash-on-invalid]
Comments
github-actions
bot
added
the
clang
Clang issues not falling into any other category
label
Jul 2, 2024
RungeCC
changed the title
[Clang]: clang crashed with
[Clang]: clang crashed with Jul 2, 2024
Assertion
idx < size()' failed in
clang::Sema::tryCaptureVariable`Assertion
idx < size()' failed in
tryCaptureVariable` when try to capture variable with function parameter scope in a trailing noexcept expression
RungeCC
changed the title
[Clang]: clang crashed with
[Clang]: clang crashed with `Jul 2, 2024
Assertion
idx < size()' failed in
tryCaptureVariable` when try to capture variable with function parameter scope in a trailing noexcept expressionAssertion
idx < size()' failed` in
clang::Sema::tryCaptureVariable` when try to capture variable with function parameter scope in a trailing noexcept expression
RungeCC
changed the title
[Clang]: clang crashed with `
[Clang]: clang crashed with `Jul 2, 2024
Assertion
idx < size()' failed` in
clang::Sema::tryCaptureVariable` when try to capture variable with function parameter scope in a trailing noexcept expressionAssertion
idx < size()' failed ` in
clang::Sema::tryCaptureVariable` when try to capture variable with function parameter scope in a trailing noexcept expression
RungeCC
changed the title
[Clang]: clang crashed with `
[Clang]: clang crashed with Jul 2, 2024
Assertion
idx < size()' failed ` in
clang::Sema::tryCaptureVariable` when try to capture variable with function parameter scope in a trailing noexcept expressionAssertion 'idx < size()' failed
in clang::Sema::tryCaptureVariable
when try to capture variable with function parameter scope in a trailing noexcept expression
EugeneZelenko
added
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
and removed
clang
Clang issues not falling into any other category
labels
Jul 2, 2024
@llvm/issue-subscribers-clang-frontend Author: Runge (RungeCC)
Reproducer:
// clang++ -std=c++26 -fsyntax-only main.cpp
struct X {
constexpr auto ICE(int&& that)
noexcept(noexcept(
[that]() {}
));
}; Assertions:
Stacktrace:
Online compiler (https://godbolt.org/z/cYPohaMe9).
Note
struct X {
constexpr auto ICE(int&& that)
noexcept(noexcept(
[that=that]() {}
));
}; Clang error:
|
Confirmed |
@cor3ntin You're right, here is the case that falls out of the fix of 'skipping past the requires expressions'. We need a generic approach then. |
This was referenced Jul 8, 2024
zyn0217
added a commit
that referenced
this issue
Jul 12, 2024
…fiers (#98023) Previously, we only pushed the function scope once we entered the function definition, whereas tryCaptureVariable() requires at least one function scope available when ParmVarDecls being captured have been owned by a function. This led to problems parsing the noexcept specifiers, as the DeclRefExprs inside them were improperly computed. Fixes #97453
aaryanshukla
pushed a commit
to aaryanshukla/llvm-project
that referenced
this issue
Jul 14, 2024
…fiers (llvm#98023) Previously, we only pushed the function scope once we entered the function definition, whereas tryCaptureVariable() requires at least one function scope available when ParmVarDecls being captured have been owned by a function. This led to problems parsing the noexcept specifiers, as the DeclRefExprs inside them were improperly computed. Fixes llvm#97453
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"
confirmed
Verified by a second party
crash
Prefer [crash-on-valid] or [crash-on-invalid]
Reproducer:
Assertions:
Stacktrace:
Online compiler (https://godbolt.org/z/cYPohaMe9).
Note
Clang error:
Additional Reproducer
The text was updated successfully, but these errors were encountered: