1 // RUN: %clang_cc1 -frecovery-ast -verify %s
2 
3 bool Foo(int *); // expected-note {{candidate function not viable}} \
4                  // expected-note {{candidate function not viable}}
5 
6 template <typename T>
7 struct Crash : decltype(Foo(T())) { // expected-error {{no matching function for call to 'Foo'}}
8   Crash(){};
9 };
10 
11 void test() { Crash<int>(); } // expected-note {{in instantiation of template class}}
12 
13 template <typename T>
14 using Alias = decltype(Foo(T())); // expected-error {{no matching function for call to 'Foo'}}
15 template <typename T>
16 struct Crash2 : decltype(Alias<T>()) { // expected-note {{in instantiation of template type alias 'Alias' requested here}}
17   Crash2(){};
18 };
19 
20 void test2() { Crash2<int>(); } // expected-note {{in instantiation of template class 'Crash2<int>' requested here}}
21