Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Anders Carlsson | d851b37 | 2009-09-07 18:25:47 +0000 | [diff] [blame] | 2 | template<typename T> struct S { |
| 3 | S(int); |
| 4 | }; |
| 5 | |
John McCall | 7c2342d | 2010-03-10 11:27:22 +0000 | [diff] [blame] | 6 | struct T; // expected-note{{forward declaration of 'T'}} |
Anders Carlsson | d851b37 | 2009-09-07 18:25:47 +0000 | [diff] [blame] | 7 | |
| 8 | void f() { |
| 9 | S<int> s0 = static_cast<S<int> >(0); |
| 10 | S<void*> s1 = static_cast<S<void*> >(00); |
| 11 | |
John McCall | 7c2342d | 2010-03-10 11:27:22 +0000 | [diff] [blame] | 12 | (void)static_cast<T>(10); // expected-error{{'T' is an incomplete type}} |
Anders Carlsson | d851b37 | 2009-09-07 18:25:47 +0000 | [diff] [blame] | 13 | } |