-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Do not evaluate dependent immediate invocations #13700
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
Conversation
We deferred the evaluation of dependent immediate invocations in https://reviews.llvm.org/D119375 until instantiation. We should also not consider them referenced from a non-consteval context. Fixes: llvm/llvm-project#55601 ``` template<typename T> class Bar { consteval static T x() { return 5; } public: Bar() : a(x()) {} private: int a; }; Bar<int> g(); ``` Is now accepted by clang. Previously it errored with: `cannot take address of consteval function 'x' outside of an immediate invocation Bar() : a(x()) {}` Differential Revision: https://reviews.llvm.org/D132031 --- Fixes root-project#13698, a problem with the new C++ headers from the new macOS SDK.
@phsft-bot build also on mac13/cxx20, mac13arm/cxx20 |
Starting build on |
Build failed on mac13arm/cxx20. Warnings:
And 891 more Failing tests:
And 61 more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this very nice PR prepared so quickly.
The numerous failures are fixed by this PR #13696 |
Build failed on ROOT-ubuntu2004/python3. Failing tests:
|
Build failed on mac13/cxx20. Warnings:
And 897 more Failing tests:
And 61 more |
Unbelievable @hahnjo - congratulations! |
FWIW there were build problems in the incremental GitHub Actions CI (because I forgot to set the right label); they are gone in a clean build triggered by the merge to |
We deferred the evaluation of dependent immediate invocations in https://reviews.llvm.org/D119375 until instantiation. We should also not consider them referenced from a non-consteval context.
Fixes: llvm/llvm-project#55601
Is now accepted by clang. Previously it errored with:
cannot take address of consteval function 'x' outside of an immediate invocation Bar() : a(x()) {}
Differential Revision: https://reviews.llvm.org/D132031
Fixes #13698, a problem with the new C++ headers from the new macOS SDK.