aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/id-isa-codegen.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjC/id-isa-codegen.m')
-rw-r--r--test/CodeGenObjC/id-isa-codegen.m18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/CodeGenObjC/id-isa-codegen.m b/test/CodeGenObjC/id-isa-codegen.m
index 3179e11b7f39..e893aaa4f3c2 100644
--- a/test/CodeGenObjC/id-isa-codegen.m
+++ b/test/CodeGenObjC/id-isa-codegen.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o %t %s
+// RUN: %clang_cc1 -emit-llvm -o - %s
typedef struct objc_class *Class;
@@ -48,3 +48,19 @@ id Test2() {
return (*[Foo method]).isa;
return [Foo method]->isa;
}
+
+// rdar 7709015
+@interface Cat {}
+@end
+
+@interface SuperCat : Cat {}
++(void)geneticallyAlterCat:(Cat *)cat;
+@end
+
+@implementation SuperCat
++ (void)geneticallyAlterCat:(Cat *)cat {
+ Class dynamicSubclass;
+ ((id)cat)->isa = dynamicSubclass;
+}
+@end
+