1 // RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -fblocks -verify %s
11 @property (strong) id myString; // expected-note {{property declared here}}
12 @property (strong) id myString1;
13 @property (retain) id myString2; // expected-note {{property declared here}}
15 @property (weak) id myString3;
16 @property (weak) id myString4;
17 @property __weak id myString5; // expected-note {{property declared here}}
20 @implementation MyClass
21 @synthesize myString; // expected-error {{existing ivar 'myString' for strong property 'myString' may not be __weak}}
22 @synthesize myString1 = StrongIvar; // OK
23 @synthesize myString2 = myString2; // expected-error {{existing ivar 'myString2' for strong property 'myString2' may not be __weak}}
25 @synthesize myString3; // OK
26 @synthesize myString4; // OK
27 @synthesize myString5 = StrongIvar5; // expected-error {{existing ivar 'StrongIvar5' for __weak property 'myString5' must be __weak}}
34 id __unsafe_unretained x; // should be __weak
36 id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}}
38 @property(weak) id x; // expected-note {{property declared here}}
39 @property(weak) id y; // expected-note {{property declared here}}
44 @synthesize x; // expected-error {{existing ivar 'x' for __weak property 'x' must be __weak}}
45 @synthesize y; // expected-error {{existing ivar 'y' for __weak property 'y' must be __weak}}
46 @synthesize z; // suppressed