diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-18 20:47:25 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-18 20:47:25 +0000 |
commit | dc5ea09c4d0a23b1cd28f763869ef2bcb5dc119a (patch) | |
tree | a50ad17e20513cb4290a30e5bf10d12d7506097f /test | |
parent | 1fb019bf42f5757c027edb56e5bb70233787a39c (diff) |
Fixes IRgen bug in objc++ reference binding of a
getter expression.
Fixes // rdar://8437240
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGenObjCXX/property-dot-reference.mm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGenObjCXX/property-dot-reference.mm b/test/CodeGenObjCXX/property-dot-reference.mm index 82e89f26ac..0d455c6ca8 100644 --- a/test/CodeGenObjCXX/property-dot-reference.mm +++ b/test/CodeGenObjCXX/property-dot-reference.mm @@ -16,3 +16,23 @@ void GetURL() const; self.node.GetURL(); } // expected-warning {{control reaches end of non-void function}} @end + +// rdar://8437240 +struct X { + int x; +}; + +void f0(const X &parent); +@interface A +- (const X&) target; +@end +void f1(A *a) { +// CHECK: [[PRP:%.*]] = call %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend +// CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* [[PRP]]) + f0(a.target); + +// CHECK: [[MSG:%.*]] = call %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend +// CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* [[MSG]]) + f0([a target]); +} + |