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