diff options
Diffstat (limited to 'test/SemaObjC/arc.m')
-rw-r--r-- | test/SemaObjC/arc.m | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/test/SemaObjC/arc.m b/test/SemaObjC/arc.m index 9c3b298..bd30715 100644 --- a/test/SemaObjC/arc.m +++ b/test/SemaObjC/arc.m @@ -641,7 +641,7 @@ void test35(void) { test36_helper(&y); ^{ test36_helper(&y); }(); - __strong int non_objc_type; // expected-warning {{'__strong' only applies to objective-c object or block pointer types}} + __strong int non_objc_type; // expected-warning {{'__strong' only applies to Objective-C object or block pointer types}} } void test36(int first, ...) { @@ -696,3 +696,24 @@ void _NSCalcBeze(NSColor* color, NSColor* bezelColors[]); // expected-error {{mu } @end +// rdar://11814185 +@interface Radar11814185 +@property (nonatomic, weak) Radar11814185* picker1; ++ alloc; +- init; +@end + +@implementation Radar11814185 + +@synthesize picker1; + +- (void)viewDidLoad +{ + picker1 = [[Radar11814185 alloc] init]; // expected-warning {{assigning retained object to weak variable; object will be released after assignment}} + self.picker1 = [[Radar11814185 alloc] init]; // expected-warning {{assigning retained object to weak property; object will be released after assignment}} +} + ++ alloc { return 0; } +- init { return 0; } +@end + |