================ @@ -186,3 +186,74 @@ class E { #endif template<typename T> using D = int; // expected-note {{declared here}} E<D> ed; // expected-note {{instantiation of}} + +namespace non_functions { + +#if __cplusplus >= 201103L +namespace PR88832 { +template <typename T> struct O { + static const T v = 0; +}; + +struct P { + template <typename T> using I = typename O<T>::v; // #TypeAlias +}; + +struct Q { + template <typename T> int foo() { + return T::template I<int>; // expected-error {{'P::I' is expected to be a non-type template, but instantiated to a type alias template}} + // expected-note@#TypeAlias {{type alias template declared here}} ---------------- zyn0217 wrote:
I think this is more of a preference - subjectively, I feel like using markers makes the diagnostics concentrated, and one can see them in a somewhat consistent block without guessing what else notes/warnings an error diagnostic would also provide, though this looks a bit untidy. :( https://github.com/llvm/llvm-project/pull/89019 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits