aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/getter-property-type-mismatch.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjC/getter-property-type-mismatch.m')
-rw-r--r--test/CodeGenObjC/getter-property-type-mismatch.m35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/CodeGenObjC/getter-property-type-mismatch.m b/test/CodeGenObjC/getter-property-type-mismatch.m
new file mode 100644
index 000000000000..c7e1c1a96a42
--- /dev/null
+++ b/test/CodeGenObjC/getter-property-type-mismatch.m
@@ -0,0 +1,35 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// rdar://11515196
+
+@interface NSArray @end
+
+@interface NSMutableArray : NSArray
+- (void) addObject;
+@end
+
+@interface BPXLAppDelegate
+
+- (NSArray *)arrayOfThings;
+
+@end
+
+
+@interface BPXLAppDelegate ()
+@property (retain, nonatomic) NSMutableArray *arrayOfThings;
+@end
+
+@implementation BPXLAppDelegate
+
+@synthesize arrayOfThings=_arrayOfThings;
+
+- (void)applicationDidFinishLaunching
+{
+ [self.arrayOfThings addObject];
+}
+
+@end
+
+// CHECK: define internal [[RET:%.*]]* @"\01-[BPXLAppDelegate arrayOfThings
+// CHECK: [[THREE:%.*]] = bitcast [[OPQ:%.*]]* [[TWO:%.*]] to [[RET]]*
+// CHECK: ret [[RET]]* [[THREE]]
+