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
ICE on valid(?) C++20 code #64808
Labels
c++20
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
EugeneZelenko
added
c++20
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
and removed
new issue
labels
Aug 18, 2023
@llvm/issue-subscribers-clang-frontend |
@llvm/issue-subscribers-c-20 |
cor3ntin
added
the
needs-reduction
Large reproducer that should be reduced into a simpler form
label
Aug 19, 2023
One reduction of this crash has been fixed in post-18 trunk: https://godbolt.org/z/P1zad4cKP auto a =
[](auto... __captures) {
return []() requires requires { 0(__captures...); } {};
}()(); Clang 17 crash:
|
However, a different reduction is still crashing in post-18 trunk: https://godbolt.org/z/MP45d35bj template <class _ImplFn>
struct __basic_sender {
__basic_sender(_ImplFn);
};
auto a =
__basic_sender {
[](auto... __captures) {
return []() requires requires { 0(__captures...); } {};
}()
} Backtrace:
|
Endilll
added
confirmed
Verified by a second party
and removed
needs-reduction
Large reproducer that should be reduced into a simpler form
labels
Feb 6, 2024
zyn0217
added a commit
to zyn0217/llvm-project
that referenced
this issue
Feb 29, 2024
…ints This fixes the case shown by llvm#64808 (comment). Similar to llvm@f9caa12, we have some calls to constraint checking for a lambda's conversion function while determining the conversion sequence. This patch addresses the problem where the requires-expression within such a lambda references to a Decl outside of the lambda by adding these Decls to the current instantiation scope. I'm abusing the flag 'ForOverloadResolution' of CheckFunctionConstraints, which is actually meant to consider the Decls from parent DeclContexts.
zyn0217
added a commit
that referenced
this issue
Mar 16, 2024
…onversion function constraints (#83420) This fixes the case shown by #64808 (comment). Similar to f9caa12, we have some calls to constraint checking for a lambda's conversion function while determining the conversion sequence. This patch addresses the problem where the requires-expression within such a lambda references to a Decl outside of the lambda by adding these Decls to the current instantiation scope. I'm abusing the flag `ForOverloadResolution` of CheckFunctionConstraints, which is actually meant to consider the Decls from parent DeclContexts. --------- Co-authored-by: cor3ntin <corentinjabot@gmail.com>
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"
confirmed
Verified by a second party
crash
Prefer [crash-on-valid] or [crash-on-invalid]
hello_world.zip
The text was updated successfully, but these errors were encountered: