Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not evaluate dependent immediate invocations
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.
- Loading branch information