xref: /llvm-project/clang/test/SemaTemplate/recovery-tree-transform-crash.cpp (revision 67174765db527ed1911f33109a34026f3913601d)
1 // RUN: %clang_cc1 -verify -frecovery-ast -frecovery-ast-type %s
2 
3 template <class T> struct Ptr { T *operator->() const; };
4 
5 struct ABC {
6   void run();
7 };
8 
9 Ptr<ABC> call(int); // expected-note {{candidate function not viable}}
10 
test()11 void test() {
12   call()->run(undef); // expected-error {{no matching function for call to 'call'}} \
13                          expected-error {{use of undeclared identifier}}
14 }
15