[cfe-commits] [patch] Warn on missing [super dealloc] call

Nico Weber thakis at chromium.org
Sun Aug 21 16:54:51 PDT 2011


Hi,

the attached patch makes clang warn on missing [super dealloc] calls.
The warning uses the same logic as gcc (
http://codesearch.google.com/#N01oSP8jpDo/gcc/objc/objc-act.c , search
for "should_call_super_dealloc" in that file). This is half of
PR10661.

Ok?

For completeness, I'd like to do the same for -finalize (gcc does, too
– "should_call_super_finalize" in the file above). Would you prefer if
I added OMF_finalize to the getMethodFamily() return type enum, or
should I check for the literal "finalize" at the places where this
patch calls getMethodFamily()? -finalize is a "special" method, so
adding it to OMF is arguable ok, but garbage collection seems on the
way out. Please let me know.

Nico
-------------- next part --------------
A non-text attachment was scrubbed...
Name: missing-dealloc.patch
Type: application/octet-stream
Size: 6175 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110821/ee46d6b1/attachment.obj>


More information about the cfe-commits mailing list