]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/SemaCXX/type-definition-in-specifier.cpp
Update clang to r86140.
[FreeBSD/FreeBSD.git] / test / SemaCXX / type-definition-in-specifier.cpp
1 // RUN: clang-cc -fsyntax-only -verify %s
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}}