Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Douglas Gregor | 402abb5 | 2009-05-28 23:31:59 +0000 | [diff] [blame] | 2 | |
| 3 | struct S0; |
| 4 | struct S1; |
| 5 | struct S2; |
| 6 | struct S3; |
| 7 | struct S4; |
| 8 | struct S5; |
| 9 | struct S6; |
| 10 | |
| 11 | struct S0 { int x; }; |
| 12 | |
| 13 | void f0() { |
| 14 | typedef struct S1 { int x; } S1_typedef; |
| 15 | |
| 16 | (void)((struct S2 { int x; }*)0); // expected-error{{can not be defined}} |
| 17 | |
| 18 | struct S3 { int x; } s3; |
| 19 | |
| 20 | (void)static_cast<struct S4 { int x; } *>(0); // expected-error{{can not be defined}} |
| 21 | } |
| 22 | |
| 23 | struct S5 { int x; } f1() { return S5(); } // expected-error{{result type}} |
| 24 | |
| 25 | void f2(struct S6 { int x; } p); // expected-error{{parameter type}} |