[cfe-commits] r143219 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExprObjC.cpp test/SemaObjC/arc-objc-lifetime.m test/SemaObjC/arc-unavailable-for-weakref.m test/SemaObjCXX/arc-unavailable-for-weakref.mm

jahanian fjahanian at apple.com
Fri Oct 28 17:09:57 PDT 2011


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

> 
> On Oct 28, 2011, at 1:06 PM, Fariborz Jahanian wrote:
> 
> We use the term "ownership" externally;  I just haven't changed the name
> internally everywhere.
> 
> Also, what do you think about this wording?
>  error: explicit ownership qualifier on cast result would have no effect
> 
>> +    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.
> 
> 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
> ParenTypes.

In r143258. Please let me know if I missed something. I could not come up with a ParenType desugaring test though.

- Fariborz

> 
> John.




More information about the cfe-commits mailing list