On Oct 28, 2011, at 2:33 PM, John McCall wrote:

> 
> On Oct 28, 2011, at 1:06 PM, Fariborz Jahanian wrote:
> 
> 
>> +    if ((castACTC == ACTC_retainable) && 
>> +        isa<AttributedType>(castType) &&
>> +        (castType.getObjCLifetime() !=  Qualifiers::OCL_None) &&
>> +        (CCK == CCK_CStyleCast || CCK == CCK_OtherCast) &&
> 
> I don't think the CCK restriction is meaningful.

Need to check this. We will have:  CCK == CCK_ImplicitConversion
In this test case:

void f8(const __strong id&);
void test_f8() {
  __strong id strong_id;
  f8(strong_id);
}

> 
> I know it's kindof marginal, but please do look through ParenTypes
> and other AttributedTypes here.  Also, AttributedTypes are not
> necessarily only ownership attributes.  Also also, please add a
> comment explaining that you're intentionally looking at type sugar
> and that you don't want to look through certain kinds of sugar.
> 
> I don't know if it's currently possible to get a good test case for other
> AttributedTypes, but (__strong NSString(*)) is a good test case for

Here is a good test for this:

NSString * NSStringObj;
…
((__strong typeof(NSStringObj)) CFBridgingRelease());

- Fariborz


> ParenTypes.
> 
> John.

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to