blob: 6d76f813f8d968b9998a2bb444371f09342cd236 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Anders Carlssond851b372009-09-07 18:25:47 +00002template<typename T> struct S {
3 S(int);
4};
5
John McCall7c2342d2010-03-10 11:27:22 +00006struct T; // expected-note{{forward declaration of 'T'}}
Anders Carlssond851b372009-09-07 18:25:47 +00007
8void f() {
9 S<int> s0 = static_cast<S<int> >(0);
10 S<void*> s1 = static_cast<S<void*> >(00);
11
John McCall7c2342d2010-03-10 11:27:22 +000012 (void)static_cast<T>(10); // expected-error{{'T' is an incomplete type}}
Anders Carlssond851b372009-09-07 18:25:47 +000013}