diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2011-10-15 17:36:49 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-10-15 17:36:49 +0000 |
| commit | 7c386f838aa63349cbea031a69ba528e265c1cc9 (patch) | |
| tree | b345fbdd1b3a0ee0def12a5ea72ca206035032cf /clang/test/CodeGenObjCXX | |
| parent | a8e267b3980a5499dffc0eb6d3309c17564decff (diff) | |
| download | bcm5719-llvm-7c386f838aa63349cbea031a69ba528e265c1cc9.tar.gz bcm5719-llvm-7c386f838aa63349cbea031a69ba528e265c1cc9.zip | |
obj-c++: allow the getter/setter to return/take parameters
by reference. // rdar://10188258
llvm-svn: 142075
Diffstat (limited to 'clang/test/CodeGenObjCXX')
| -rw-r--r-- | clang/test/CodeGenObjCXX/property-object-reference.mm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjCXX/property-object-reference.mm b/clang/test/CodeGenObjCXX/property-object-reference.mm index b87ce2303b5..0bd8fb8b9ff 100644 --- a/clang/test/CodeGenObjCXX/property-object-reference.mm +++ b/clang/test/CodeGenObjCXX/property-object-reference.mm @@ -2,9 +2,14 @@ // rdar://10188258 struct Foo {int i;}; +static Foo gFoo; + @interface ObjCTest { } @property (nonatomic, readonly) Foo& FooRefProperty; +@property (nonatomic) Foo FooProperty; +- (Foo &) FooProperty; +- (void)setFooProperty : (Foo &) arg; @end @@ -13,11 +18,18 @@ struct Foo {int i;}; -(void) test { Foo& f = self.FooRefProperty; + Foo& f1 = self.FooProperty; } +- (Foo &) FooProperty { return gFoo; } +- (void)setFooProperty : (Foo &) arg { }; @end // CHECK: [[T0:%.*]] = load {{%.*}} [[S0:%.*]] // CHECK: load i8** @"\01L_OBJC_SELECTOR_REFERENCES_ // CHECK: [[T2:%.*]] = bitcast {{%.*}} [[T0]] to i8* // CHECK: @objc_msgSend +// CHECK: [[R0:%.*]] = load {{%.*}} [[U0:%.*]] +// CHECK: load i8** @"\01L_OBJC_SELECTOR_REFERENCES_ +// CHECK: [[R2:%.*]] = bitcast {{%.*}} [[R0]] to i8* +// CHECK: @objc_msgSend |

