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

John McCall rjmccall at apple.com
Mon Jul 30 18:39:36 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.

The main point of ACC_bottom is to allow you to merge a null or constant value from one side of a conditional expression with anything else.

John.



More information about the cfe-commits mailing list