Fariborz Jahanian | 0ca0b1f | 2010-05-15 23:05:52 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -fobjc-nonfragile-abi -emit-llvm -o - | FileCheck %s |
| 2 | // CHECK-NOT: callq _objc_msgSend_stret |
Fariborz Jahanian | 97a73cd | 2010-05-06 15:45:36 +0000 | [diff] [blame] | 3 | // CHECK: call void @_ZN1SC1ERKS_ |
| 4 | // CHECK: call %class.S* @_ZN1SaSERKS_ |
Fariborz Jahanian | b3ebe94 | 2010-05-10 22:57:35 +0000 | [diff] [blame] | 5 | // CHECK: call %class.S* @_ZN6CGRectaSERKS_ |
Fariborz Jahanian | 97a73cd | 2010-05-06 15:45:36 +0000 | [diff] [blame] | 6 | |
| 7 | class S { |
| 8 | public: |
| 9 | S& operator = (const S&); |
| 10 | S (const S&); |
| 11 | S (); |
| 12 | }; |
| 13 | |
Fariborz Jahanian | b3ebe94 | 2010-05-10 22:57:35 +0000 | [diff] [blame] | 14 | struct CGRect { |
| 15 | CGRect & operator = (const CGRect &); |
| 16 | }; |
| 17 | |
Fariborz Jahanian | 97a73cd | 2010-05-06 15:45:36 +0000 | [diff] [blame] | 18 | @interface I { |
| 19 | S position; |
Fariborz Jahanian | b3ebe94 | 2010-05-10 22:57:35 +0000 | [diff] [blame] | 20 | CGRect bounds; |
Fariborz Jahanian | 97a73cd | 2010-05-06 15:45:36 +0000 | [diff] [blame] | 21 | } |
| 22 | @property(assign, nonatomic) S position; |
Fariborz Jahanian | b3ebe94 | 2010-05-10 22:57:35 +0000 | [diff] [blame] | 23 | @property CGRect bounds; |
Fariborz Jahanian | 0ca0b1f | 2010-05-15 23:05:52 +0000 | [diff] [blame] | 24 | @property CGRect frame; |
| 25 | - (void)setFrame:(CGRect)frameRect; |
| 26 | - (CGRect)frame; |
Fariborz Jahanian | b3ebe94 | 2010-05-10 22:57:35 +0000 | [diff] [blame] | 27 | - (void) initWithOwner; |
Fariborz Jahanian | 97a73cd | 2010-05-06 15:45:36 +0000 | [diff] [blame] | 28 | @end |
| 29 | |
| 30 | @implementation I |
| 31 | @synthesize position; |
Fariborz Jahanian | b3ebe94 | 2010-05-10 22:57:35 +0000 | [diff] [blame] | 32 | @synthesize bounds; |
Fariborz Jahanian | 0ca0b1f | 2010-05-15 23:05:52 +0000 | [diff] [blame] | 33 | @synthesize frame; |
| 34 | - (void)setFrame:(CGRect)frameRect {} |
| 35 | - (CGRect)frame {return bounds;} |
| 36 | |
Fariborz Jahanian | b3ebe94 | 2010-05-10 22:57:35 +0000 | [diff] [blame] | 37 | - (void)initWithOwner { |
Fariborz Jahanian | 0ca0b1f | 2010-05-15 23:05:52 +0000 | [diff] [blame] | 38 | I* _labelLayer; |
Fariborz Jahanian | b3ebe94 | 2010-05-10 22:57:35 +0000 | [diff] [blame] | 39 | CGRect labelLayerFrame = self.bounds; |
| 40 | labelLayerFrame = self.bounds; |
Fariborz Jahanian | 0ca0b1f | 2010-05-15 23:05:52 +0000 | [diff] [blame] | 41 | _labelLayer.frame = labelLayerFrame; |
Fariborz Jahanian | b3ebe94 | 2010-05-10 22:57:35 +0000 | [diff] [blame] | 42 | } |
Fariborz Jahanian | 97a73cd | 2010-05-06 15:45:36 +0000 | [diff] [blame] | 43 | @end |
Fariborz Jahanian | bbb5224 | 2010-05-07 18:56:13 +0000 | [diff] [blame] | 44 | |
| 45 | int main() { |
| 46 | I *i; |
| 47 | S s1; |
| 48 | i.position = s1; |
| 49 | return 0; |
| 50 | } |
| 51 | |