Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaTemplate / instantiation-order.cpp
blob9cac256ad4587ff570fcd1dbdf298f383061bf2a
1 // RUN: %clang_cc1 -std=c++11 -verify %s
3 // From core issue 1227.
5 template <class T> struct A { using X = typename T::X; }; // expected-error {{no members}}
6 template <class T> typename T::X f(typename A<T>::X);
7 template <class T> void f(...) {}
8 template <class T> auto g(typename A<T>::X) -> typename T::X; // expected-note {{here}}
9 template <class T> void g(...) {}
11 void h()
13 f<int>(0); // ok, SFINAE in return type
14 g<int>(0); // not ok, substitution inside A<int> is a hard error // expected-note {{substituting}}