blob: 3b2d0fceb9788afc40d6ccd544126eb6b4a8d8ac [file] [log] [blame]
Charles Davisd18f9f92010-08-16 04:01:50 +00001// RUN: %clang_cc1 -cxx-abi microsoft -fsyntax-only -verify %s
2
3// Test that we reject pointers to members of incomplete classes (for now)
4struct A; //expected-note{{forward declaration of 'A'}}
5int A::*pai1; //expected-error{{incomplete type 'A'}}
6
Charles Davisf231df32010-08-16 05:30:44 +00007// Test that we don't allow reinterpret_casts from pointers of one size to
8// pointers of a different size.
9struct A {};
10struct B {};
11struct C: A, B {};
12
13void (A::*paf)();
14void (C::*pcf)() = reinterpret_cast<void (C::*)()>(paf); //expected-error{{cannot reinterpret_cast from member pointer type}}