Fariborz Jahanian | 353b33b | 2010-06-17 23:00:29 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fobjc-gc -triple x86_64-apple-darwin10 -emit-llvm -o - %s |
| 2 | // rdar: // 7501812 |
| 3 | |
John McCall | 0943168 | 2010-11-18 19:01:18 +0000 | [diff] [blame] | 4 | struct A { |
| 5 | int member; |
| 6 | void foo(); |
| 7 | A *operator->(); |
| 8 | }; |
Fariborz Jahanian | 353b33b | 2010-06-17 23:00:29 +0000 | [diff] [blame] | 9 | struct B : A { }; |
| 10 | |
| 11 | @interface BInt { |
| 12 | @private |
| 13 | B *b; |
| 14 | } |
| 15 | - (B)value; |
| 16 | - (void)setValue : (B) arg; |
| 17 | @property B value; |
| 18 | @end |
| 19 | |
| 20 | void g(BInt *bint) { |
John McCall | 0943168 | 2010-11-18 19:01:18 +0000 | [diff] [blame] | 21 | bint.value.foo(); |
| 22 | bint.value->member = 17; |
| 23 | int x = bint.value.member; |
Fariborz Jahanian | 353b33b | 2010-06-17 23:00:29 +0000 | [diff] [blame] | 24 | } |
| 25 | |