Fariborz Jahanian | 8fba894 | 2012-04-30 23:20:30 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fblocks -rewrite-objc -fms-extensions %s -o %t-rw.cpp |
NAKAMURA Takumi | 9ff009f | 2012-05-01 10:52:06 +0000 | [diff] [blame] | 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 |
Fariborz Jahanian | 8fba894 | 2012-04-30 23:20:30 +0000 | [diff] [blame] | 3 | |
| 4 | struct OUTSIDE { |
| 5 | int i_OUTSIDE; |
| 6 | double d_OUTSIDE; |
| 7 | }; |
| 8 | |
| 9 | |
| 10 | @interface I1 { |
| 11 | @protected |
| 12 | struct OUTSIDE ivar_I1; |
| 13 | |
| 14 | struct INNER_I1 { |
| 15 | int i_INNER_I1; |
| 16 | double d_INNER_I1; |
| 17 | }; |
| 18 | |
| 19 | struct INNER_I1 ivar_I2; |
| 20 | |
| 21 | struct OUTSIDE ivar_I3; |
| 22 | |
| 23 | struct { |
| 24 | int i_noname; |
| 25 | double d_noname; |
| 26 | } NONAME_I4; |
| 27 | |
| 28 | struct { |
| 29 | int i_noname; |
| 30 | double d_noname; |
| 31 | } NONAME_I5; |
| 32 | } |
| 33 | @end |
| 34 | |
| 35 | @implementation I1 |
| 36 | - (void) I1_Meth { |
| 37 | ivar_I1.i_OUTSIDE = 0; |
| 38 | |
| 39 | ivar_I2.i_INNER_I1 = 1; |
| 40 | |
| 41 | ivar_I3.i_OUTSIDE = 2; |
| 42 | |
| 43 | NONAME_I4.i_noname = 3; |
| 44 | |
| 45 | NONAME_I5.i_noname = 4; |
| 46 | } |
| 47 | @end |
| 48 | |
| 49 | @interface INTF2 { |
| 50 | @protected |
| 51 | struct OUTSIDE ivar_INTF2; |
| 52 | |
| 53 | struct { |
| 54 | int i_noname; |
| 55 | double d_noname; |
| 56 | } NONAME_INTF4; |
| 57 | |
| 58 | |
| 59 | struct OUTSIDE ivar_INTF3; |
| 60 | |
| 61 | struct INNER_I1 ivar_INTF4; |
| 62 | |
| 63 | struct { |
| 64 | int i_noname; |
| 65 | double d_noname; |
| 66 | } NONAME_INTF5; |
| 67 | |
| 68 | struct INNER_INTF2 { |
| 69 | int i_INNER_INTF2; |
| 70 | double d_INNER_INTF2; |
| 71 | }; |
| 72 | |
| 73 | struct INNER_INTF2 ivar_INTF6, ivar_INTF7; |
| 74 | |
| 75 | struct INNER_INTF3 { |
| 76 | int i; |
| 77 | } X1,X2,X3; |
| 78 | |
| 79 | } |
| 80 | @end |
| 81 | |
| 82 | @implementation INTF2 |
| 83 | - (void) I2_Meth { |
| 84 | ivar_INTF2.i_OUTSIDE = 0; |
| 85 | |
| 86 | ivar_INTF4.i_INNER_I1 = 1; |
| 87 | |
| 88 | ivar_INTF3.i_OUTSIDE = 2; |
| 89 | |
| 90 | NONAME_INTF4.i_noname = 3; |
| 91 | |
| 92 | NONAME_INTF5.i_noname = 4; |
| 93 | ivar_INTF6.i_INNER_INTF2 = 5; |
| 94 | ivar_INTF7.i_INNER_INTF2 = 5; |
| 95 | X1.i = X2.i = X3.i = 1; |
| 96 | } |
| 97 | @end |
| 98 | |