[cfe-commits] [patch] warn on missing [super finalize] call
thakis at chromium.org
Sun Aug 28 15:34:20 PDT 2011
On Sun, Aug 28, 2011 at 6:58 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
> LGTM. I am not sure though that this warning, like the other one, makes any sense in arc mode.
> You may want to turn it off in arc mode.
My reasoning was: If one enables both arc and garbage collection
(which doesn't make much sense), then the compiler will automatically
insert retain/release calls (arc) which are noops (gc). Getting
finalize right in this mode is still important. (But I guess not many
will use arc with gc, so it doesn't matter much either way.)
> - Fariborz
> On Aug 28, 2011, at 2:58 AM, Nico Weber wrote:
>> the attached patch makes clang warn on missing [super finalize] calls.
>> The warning uses the same logic as gcc (
>> http://codesearch.google.com/#N01oSP8jpDo/gcc/objc/objc-act.c , search
>> for "should_call_super_finalize" in that file). This is half of
>> This follows Fariborz' advice from
>> . I added OMF_finalize to a few switch statements, mostly to fix
>> "unhandled value in switch" warnings – I tried to add it so that it
>> didn't change the previous semantics.
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
More information about the cfe-commits