aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/id-isa-codegen.m
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-02-05 19:18:30 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-02-05 19:18:30 +0000
commit5ed676c90c839c89093b605d76c7e581ab69ebb8 (patch)
tree781c3e9163ea5857a352ee2831f645a5783c288b /test/CodeGenObjC/id-isa-codegen.m
parentae4c77dc8a77ee89e5b2de8003283249e38075c3 (diff)
Fix a code gen bug accessing 'isa' field via a message call
(Fixes radar 7609722). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95406 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC/id-isa-codegen.m')
-rw-r--r--test/CodeGenObjC/id-isa-codegen.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGenObjC/id-isa-codegen.m b/test/CodeGenObjC/id-isa-codegen.m
index 89e9922090..3179e11b7f 100644
--- a/test/CodeGenObjC/id-isa-codegen.m
+++ b/test/CodeGenObjC/id-isa-codegen.m
@@ -34,3 +34,17 @@ Class Test(const void *inObject1) {
return ((id)inObject1)->isa;
return (id)0;
}
+
+// rdar 7609722
+@interface Foo {
+@public
+ id isa;
+}
++(id)method;
+@end
+
+id Test2() {
+ if([Foo method]->isa)
+ return (*[Foo method]).isa;
+ return [Foo method]->isa;
+}