Nick Lewycky | d9ca4ab | 2010-08-20 20:54:15 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | // We don't expect a fix-it to be applied in this case. Clang used to crash |
| 4 | // trying to recover while adding 'this->' before Work(x); |
| 5 | |
| 6 | template <typename> struct A { |
| 7 | static void Work(int); // expected-note{{must qualify identifier}} |
| 8 | }; |
| 9 | |
| 10 | template <typename T> struct B : public A<T> { |
| 11 | template <typename T2> B(T2 x) { |
| 12 | Work(x); // expected-error{{use of undeclared identifier}} |
| 13 | } |
| 14 | }; |
| 15 | |
| 16 | void Test() { |
| 17 | B<int> b(0); // expected-note{{in instantiation of function template}} |
| 18 | } |
| 19 | |