<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 28, 2011, at 2:33 PM, John McCall wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Oct 28, 2011, at 1:06 PM, Fariborz Jahanian wrote:<br><br><font class="Apple-style-span" color="#16761c"><br></font><blockquote type="cite">+ if ((castACTC == ACTC_retainable) && <br></blockquote><blockquote type="cite">+ isa<AttributedType>(castType) &&<br></blockquote><blockquote type="cite">+ (castType.getObjCLifetime() != Qualifiers::OCL_None) &&<br></blockquote><blockquote type="cite">+ (CCK == CCK_CStyleCast || CCK == CCK_OtherCast) &&<br></blockquote><br>I don't think the CCK restriction is meaningful.<br></div></blockquote><div><br></div>Need to check this. We will have: CCK == CCK_ImplicitConversion</div><div>In this test case:</div><div><br></div><div><div>void f8(const __strong id&);</div><div>void test_f8() {</div><div> __strong id strong_id;</div><div> f8(strong_id);</div><div>}</div><div><br></div><blockquote type="cite"><div><br>I know it's kindof marginal, but please do look through ParenTypes<br>and other AttributedTypes here. Also, AttributedTypes are not<br>necessarily only ownership attributes. Also also, please add a<br>comment explaining that you're intentionally looking at type sugar<br>and that you don't want to look through certain kinds of sugar.<br><br>I don't know if it's currently possible to get a good test case for other<br>AttributedTypes, but (__strong NSString(*)) is a good test case for<br></div></blockquote><div><br></div>Here is a good test for this:</div><div><br></div><div>NSString * NSStringObj;</div><div>…</div><div>((__strong typeof(NSStringObj)) CFBridgingRelease());</div><div><br></div><div>- Fariborz</div><div><br></div><div><br><blockquote type="cite"><div>ParenTypes.<br><br>John.</div></blockquote></div><br></body></html>