Fariborz Jahanian | b68258f | 2012-05-01 17:46:45 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fblocks -rewrite-objc -fms-extensions %s -o %t-rw.cpp |
2 | // RUN: %clang_cc1 -Werror -fsyntax-only -Wno-address-of-temporary -Wno-c++11-narrowing -std=c++11 -D"Class=void*" -D"id=void*" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp | ||||
3 | // rdar://11351299 | ||||
4 | |||||
5 | struct Q { | ||||
6 | int x; | ||||
7 | }; | ||||
8 | |||||
9 | @interface I | ||||
10 | @end | ||||
11 | |||||
12 | @interface I() { | ||||
13 | |||||
14 | struct { | ||||
15 | int x; | ||||
16 | } unnamed; | ||||
17 | |||||
18 | struct S { | ||||
19 | int x; | ||||
20 | } foo; | ||||
21 | |||||
22 | double dd; | ||||
23 | |||||
24 | struct S foo1; | ||||
25 | } | ||||
26 | @end | ||||
27 | |||||
28 | @implementation I | ||||
29 | { | ||||
30 | struct P { | ||||
31 | int x; | ||||
32 | } bar; | ||||
33 | |||||
34 | double ee; | ||||
35 | |||||
36 | struct Q bar1; | ||||
37 | |||||
38 | struct { | ||||
39 | int x; | ||||
40 | } noname; | ||||
41 | } | ||||
42 | |||||
43 | - (void) Meth { | ||||
44 | foo.x = 1; | ||||
45 | bar.x = 2; | ||||
46 | dd = 1.23; | ||||
47 | ee = 0.0; | ||||
48 | foo1.x = 3; | ||||
49 | bar1.x = 4; | ||||
50 | noname.x = 3; | ||||
51 | unnamed.x = 10; | ||||
52 | } | ||||
53 | @end |