diff options
Diffstat (limited to 'test/SemaObjC/arc-property-lifetime.m')
-rw-r--r-- | test/SemaObjC/arc-property-lifetime.m | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/test/SemaObjC/arc-property-lifetime.m b/test/SemaObjC/arc-property-lifetime.m index b1c84c75c0582..9cc3ada15fad9 100644 --- a/test/SemaObjC/arc-property-lifetime.m +++ b/test/SemaObjC/arc-property-lifetime.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-nonfragile-abi -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -verify %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -verify %s // rdar://9340606 @interface Foo { @@ -79,7 +79,7 @@ @implementation Gorf @synthesize x; -@synthesize y; // expected-error {{existing ivar 'y' for unsafe_unretained property 'y' must be __unsafe_unretained}} +@synthesize y; // expected-error {{existing ivar 'y' for property 'y' with assign attribute must be __unsafe_unretained}} @synthesize z; @end @@ -94,7 +94,7 @@ @implementation Gorf2 @synthesize x; -@synthesize y; // expected-error {{existing ivar 'y' for unsafe_unretained property 'y' must be __unsafe_unretained}} +@synthesize y; // expected-error {{existing ivar 'y' for property 'y' with unsafe_unretained attribute must be __unsafe_unretained}} @synthesize z; @end @@ -110,3 +110,18 @@ @synthesize isAutosaving = _isAutosaving; @end +// rdar://10239594 +// Test for 'Class' properties being unretained. +@interface MyClass { +@private + Class _controllerClass; + id _controllerId; +} +@property (copy) Class controllerClass; +@property (copy) id controllerId; +@end + +@implementation MyClass +@synthesize controllerClass = _controllerClass; +@synthesize controllerId = _controllerId; +@end |