<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 19, 2013, at 4:07 PM, Argyrios Kyrtzidis <<a href="mailto:kyrtzidis@apple.com">kyrtzidis@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div><div><div>On Mar 12, 2013, at 3:22 PM, Fariborz Jahanian <<a href="mailto:fjahanian@apple.com">fjahanian@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Author: fjahanian<br>Date: Tue Mar 12 17:22:38 2013<br>New Revision: 176906<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=176906&view=rev">http://llvm.org/viewvc/llvm-project?rev=176906&view=rev</a><br>Log:<br>Objective-C: In my last path, also check<br>for existence of user setter before<span class="Apple-converted-space"> </span><br>issuing the warning about non-synthesizable<br>property. //<span class="Apple-converted-space"> </span><a href="rdar://13388503">rdar://13388503</a><br></div></blockquote><div><br></div><div>The warning is supposed to go away if the compiler can see the setter, is this right ?</div><div>These cases still display the warning:</div></div></div></blockquote><div><br></div>Yes, both of these cases should not produce a warning. I will look into this.</div><div><br></div><div>- Thanks, Fariborz</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div><br></div><div>1)</div><div><br></div><div><div>@interface B</div><div>@property (readonly) id prop;</div><div>@end</div><div><br></div><div>@interface B()</div><div>-(void)setProp:(id)x;</div><div>@end</div><div><br></div><div>@interface S : B</div><div>@property (assign,readwrite) id prop;</div><div>@end</div><div><br></div><div>@implementation S</div><div>@end</div><div><br></div></div><div>2)</div><div><br></div><div><div>@interface B</div><div>@property (readonly) id prop;</div><div>@end</div><div><br></div><div>@interface B(cat)</div><div>@property (readwrite) id prop;</div><div>@end</div><div><br></div><div>@interface S : B</div><div>@property (assign,readwrite) id prop;</div><div>@end</div><div><br></div><div>@implementation S</div><div>@end</div><div><br></div><div><br></div><div>Shouldn't the warning be suppressed ?</div><div><br></div><div>-Argyrios</div></div><br><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><br>Modified:<br> cfe/trunk/lib/Sema/SemaObjCProperty.cpp<br> cfe/trunk/test/SemaObjC/default-synthesize-3.m<br><br>Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp<br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=176906&r1=176905&r2=176906&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=176906&r1=176905&r2=176906&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)<br>+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Tue Mar 12 17:22:38 2013<br>@@ -1589,7 +1589,8 @@ void Sema::DefaultSynthesizeProperties(S<br> ObjCPropertyDecl *PropInSuperClass = SuperPropMap[Prop->getIdentifier()];<br> if ((Prop->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_readwrite) &&<br> (PropInSuperClass->getPropertyAttributes() &<br>- ObjCPropertyDecl::OBJC_PR_readonly)) {<br>+ ObjCPropertyDecl::OBJC_PR_readonly) &&<br>+ !IMPDecl->getInstanceMethod(Prop->getSetterName())) {<br> Diag(Prop->getLocation(), diag::warn_no_autosynthesis_property)<br> << Prop->getIdentifier()->getName();<br> Diag(PropInSuperClass->getLocation(), diag::note_property_declare);<br><br>Modified: cfe/trunk/test/SemaObjC/default-synthesize-3.m<br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/default-synthesize-3.m?rev=176906&r1=176905&r2=176906&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/default-synthesize-3.m?rev=176906&r1=176905&r2=176906&view=diff</a><br>==============================================================================<br>--- cfe/trunk/test/SemaObjC/default-synthesize-3.m (original)<br>+++ cfe/trunk/test/SemaObjC/default-synthesize-3.m Tue Mar 12 17:22:38 2013<br>@@ -44,6 +44,7 @@ __attribute ((objc_requires_property_def<br>@interface NSObject @end<br>@protocol Foo<br>@property (readonly) char isFoo; // expected-note {{property declared here}}<br>+@property (readonly) char isNotFree;<br>@end<br><br>@interface Bar : NSObject <Foo><br>@@ -53,6 +54,9 @@ __attribute ((objc_requires_property_def<br>- (char)isFoo {<br> return 0;<br>}<br>+- (char)isNotFree {<br>+ return 0;<br>+}<br>@end<br><br>@interface Baz : Bar<br>@@ -62,10 +66,17 @@ __attribute ((objc_requires_property_def<br>@property (readwrite) char isFoo; // expected-warning {{auto property synthesis will not synthesize property 'isFoo' because it is 'readwrite' but it will be synthesized 'readonly' via another property}}<br>@property char Property1; // expected-warning {{auto property synthesis will not synthesize property 'Property1' because it cannot share an ivar with another synthesized property}}<br>@property char Property2;<br>+@property (readwrite) char isNotFree;<br>@end<br><br>@implementation Baz {<br> char _isFoo;<br>+ char _isNotFree;<br>}<br>@synthesize Property2 = Property1; // expected-note {{property synthesized here}}<br>+<br>+- (void) setIsNotFree : (char)Arg {<br>+ _isNotFree = Arg;<br>+}<br>+<br>@end<br><br><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a></div></blockquote></div><br></div></blockquote></div><br></body></html>