[cfe-commits] [PATCH] WIP: catch CFMakeCollectable(NULL) with static analyzer

Jordan Rose jordan_rose at apple.com
Wed Nov 7 09:13:09 PST 2012


Committed in r167537. Thanks, Sean!

Jordan


On Nov 5, 2012, at 18:32 , Sean McBride <sean at rogue-research.com> wrote:

> Jordan,
> 
> Updated patch attached.
> 
> Thanks,
> 
> Sean
> 
> 
> On Fri, 2 Nov 2012 09:49:37 -0700, Jordan Rose said:
> 
>> Hi, Sean. Thanks for the patch!
>> 
>> Most of the tests in retain-release.m are just top-level functions,
>> numbered numerically from lack of imagination. The arguments are fairly
>> arbitrary—'p' is just 'pointer' (I think), and 'x' is being used as a
>> sort of "coin toss" to arbitrarily create conditions where the analyzer
>> considers both branches equally likely.
>> 
>> The actual patch itself looks good, except I'd stick an
>> 'llvm_unreachable' in a last 'else' case for that chained if-statement.
>> 
>> Your test output is fine; if something broke it would say "Unexpected
>> Failures" and probably print output from that test as well.
>> 
>> Once you've updated the patch, please send it back to the list!
>> Jordan
> <CFMakeCollectable-with-null2.patch>





More information about the cfe-commits mailing list