[cfe-commits] r160902 - in /cfe/trunk: lib/Sema/SemaExprObjC.cpp test/SemaObjC/arc-bridged-cast.m test/SemaObjC/arc-cf.m

jahanian fjahanian at apple.com
Sat Jul 28 12:00:51 PDT 2012


On Jul 27, 2012, at 5:55 PM, Jordan Rose wrote:

> 
> On Jul 27, 2012, at 5:13 PM, jahanian <fjahanian at apple.com> wrote:
> 
>> 
>> On Jul 27, 2012, at 4:59 PM, Jordan Rose wrote:
>> 
>>> Awesome! One last comment…this now handles ACC* possibilities ACC_plusOne, ACC_plusZero, and ACC_invalid, but not ACC_bottom, in which it doesn't matter which cast we use. We might as well just use __bridge, since it's not standard convention to CFRelease strings created with CFSTR.
>> 
>> Ok, I added this in r160906. Could you provide a test case for this? I am not sure when ACC_bottom is used.
> 
> ACC_bottom is used for things that can be retained or released but don't actually track retain counts; in the code there are cases provided for null pointers and ObjC string literals (and the _CFStringMakeConstantString builtin). However, it seems like we always accept these cases even without bridge casts, so we'll never actually hit this warning.

Makes sense. assert added in r160923.
- fariborz

> 
> I'd be okay with asserting that ACC_bottom never appears. Sorry for crying wolf here!
> Jordan
> 





More information about the cfe-commits mailing list