Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Anders Carlsson | 863dbcb | 2009-12-07 08:29:39 +0000 | [diff] [blame] | 2 | |
| 3 | namespace PR5557 { |
| 4 | template <class T> struct A { |
| 5 | A(); |
| 6 | virtual int a(T x); |
| 7 | }; |
| 8 | template<class T> A<T>::A() {} |
| 9 | template<class T> int A<T>::a(T x) { |
| 10 | return *x; // expected-error{{requires pointer operand}} |
| 11 | } |
| 12 | |
| 13 | A<int> x; // expected-note{{instantiation}} |
| 14 | |
| 15 | template<typename T> |
| 16 | struct X { |
| 17 | virtual void f(); |
| 18 | }; |
| 19 | |
| 20 | template<> |
| 21 | void X<int>::f() { } |
| 22 | } |