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

Sean McBride sean at rogue-research.com
Thu Nov 1 12:17:51 PDT 2012


Hi all,

Attached is a patch that expands the analyzer's check for CFRelease(NULL) to also catch CFMakeCollectable(NULL).

It builds, and the resulting clang does now warn on CFMakeCollectable(NULL), but I have not added a test.  I'm pretty sure the test belongs in retain-release.m in f16() and f17(), but don't see who calls them, what their parameters mean, or what their names mean.

I ran the test suite:

$ make check-clang

[100%] Running the Clang regression tests
lit.py: lit.cfg:171: note: using clang: '/Users/smcbride/Documents/Development/llvm-bin/bin/./clang'
Testing Time: 169.28s
  Expected Passes    : 5511
  Expected Failures  : 24
  Unsupported Tests  : 5
[100%] Built target check-clang

Not sure what output I should see... I guess this indicates nothing got broken?

Thanks,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CFMakeCollectable-with-null.patch
Type: application/octet-stream
Size: 6067 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121101/88ec3880/attachment.obj>


More information about the cfe-commits mailing list