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