1 // RUN: %clang_cc1 -triple i686-pc-win32 -fsyntax-only -verify %s -DMS
2 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu-pc-win32 -fsyntax-only -verify %s
16 t
= 17; // expected-error{{incompatible}}
19 extern template class X0
<int>;
21 extern template class X0
<int*>;
24 void X0
<T
>::Inner::g(T t
) {
26 t
= 17; // expected-error{{incompatible integer to pointer conversion assigning to 'long *'}} expected-error{{incompatible integer to pointer conversion assigning to 'int *'}}
28 t
= 17; // expected-error{{incompatible integer to pointer conversion assigning to 'long *'}}
32 void test_intptr(X0
<int*> xi
, X0
<int*>::Inner xii
) {
35 xii
.g(0); // expected-note {{instantiation}}
41 extern template class X0
<long*>;
43 void test_longptr(X0
<long*> xl
, X0
<long*>::Inner xli
) {
48 template class X0
<long*>; // expected-note 2{{instantiation}}
53 void f(T t
) { t
+= 2; }
63 extern template class X1
<void*>;
65 void g_X1(X1
<void*> x1
, void *ptr
) {
69 extern template void X1
<const void*>::g(const void*);
71 void g_X1_2(X1
<const void *> x1
, const void *ptr
) {
75 namespace static_const_member
{
76 template <typename T
> struct A
{ static const int n
; };
77 template <typename T
> const int A
<T
>::n
= 3;
78 extern template struct A
<int>;