-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Clang does not accept consteval operators #62886
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
Comments
@llvm/issue-subscribers-c-20 |
@llvm/issue-subscribers-clang-frontend |
This only happens inside a template. |
Wow, I'd like to take a look. |
I spent time debugging issue with operator I'm feeling there might be a bug in template instantiation process. The first time the original
And then the whole operator is rebuilt for some reason, including the new reference to an overloaded operator, the new
I'm new to templates instantiation, but I have a gut feeling that we shouldn't be rebuilding the whole operator call in this case, especially after we decided to mark original I'll keep digging, but cc @erichkeane in case my understanding regarding template instantiation process is wrong. |
I'm not very familiar with the |
That is the decl ref via which the operator is referenced. This one: But my question is, why the original decl ref coming from the function template is first marked as referenced (likely in a context of a new function created, if I understand correctly the comment in here - llvm-project/clang/lib/Sema/TreeTransform.h Line 10789 in 81fb5a0
|
Proposed https://reviews.llvm.org/D151553 |
GCC:
g++.dg/cpp2a/consteval31.C
https://godbolt.org/z/MxncM3Yaq
Looks important to fix and a possible blocker to #57094
The text was updated successfully, but these errors were encountered: