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: https://github.com/llvm/llvm-project/issues/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()) {}
NIT: a small nit