-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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 while considering conversion functions in the context of copy-initializing a type from the same type #50891
Labels
bugzilla
Issues migrated from bugzilla
c++20
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
concepts
C++20 concepts
Comments
|
@llvm/issue-subscribers-c-20 |
Quuxplusone
changed the title
considering conversion functions in the context of copy-initializing a type from the same type
ICE while considering conversion functions in the context of copy-initializing a type from the same type
Jan 16, 2022
3 tasks
saxbophone
added a commit
to saxbophone/arby
that referenced
this issue
May 26, 2022
- Provided generic operator for everything else. Wanted to constrain it with concepts, couldn't because of Clang++ bug llvm/llvm-project#50891 - Modified float test case to be generic
Fix out for review at https://reviews.llvm.org/D133052 |
EugeneZelenko
added
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
and removed
c++
labels
Aug 31, 2022
@llvm/issue-subscribers-clang-frontend |
This is similar to #44304 |
usx95
referenced
this issue
Oct 28, 2022
concept When we failed the lookup of the function, we tried to form a RecoveryExpr that caused us to recursively re-check the same constraint, which caused us to try to double-insert the satisfaction into the cache. This patch makes us just return the inner-cached version instead. We DO end up double-evaluating thanks to the recovery-expr, but there isn't a good way around that.
Note, closing in on committing hte fix here: https://reviews.llvm.org/D136975 |
erichkeane
pushed a commit
that referenced
this issue
Nov 1, 2022
Based on discussion on the core reflector, it was made clear that a concept that depends on itself should be a hard error, not a constraint failure. This patch implements a stack of constraint-checks-in-progress to make sure we quit, rather than hitting stack-exhaustion. Note that we DO need to be careful to make sure we still check constraints properly that are caused by a previous constraint, but not derived from (such as when a check causes us to check special member function generation), so we cannot use the existing logic to see if this is being instantiated. This fixes #44304 and #50891. Differential Revision: https://reviews.llvm.org/D136975
Fixed by 2cee266 |
veselypeta
pushed a commit
to veselypeta/cherillvm
that referenced
this issue
May 28, 2024
Based on discussion on the core reflector, it was made clear that a concept that depends on itself should be a hard error, not a constraint failure. This patch implements a stack of constraint-checks-in-progress to make sure we quit, rather than hitting stack-exhaustion. Note that we DO need to be careful to make sure we still check constraints properly that are caused by a previous constraint, but not derived from (such as when a check causes us to check special member function generation), so we cannot use the existing logic to see if this is being instantiated. This fixes llvm/llvm-project#44304 and llvm/llvm-project#50891. Differential Revision: https://reviews.llvm.org/D136975
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bugzilla
Issues migrated from bugzilla
c++20
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
concepts
C++20 concepts
Extended Description
Reduced from StackOverflow (https://stackoverflow.com/q/68853472/2069064):
clang is trying to check to see if
a.operator Derived()
is a valid expression as part of checking iffoo(a)
is valid. But we shouldn't be going that route here at all, copy-initializing aDerived
from an lvalue of typeDerived
should only check constructors, not conversion functions.The text was updated successfully, but these errors were encountered: