[cfe-commits] [PATCH] -Wconversion-null

Lubos Lunak l.lunak at suse.cz
Wed Mar 14 11:54:31 PDT 2012

On Wednesday 14 of March 2012, David Blaikie wrote:
> On Tue, Mar 13, 2012 at 10:53 PM, Lubos Lunak <l.lunak at suse.cz> wrote:
> >  Updated patch attached.
> Great - I have two optional suggestions
> * You can remove the stddef.h include from test/SemaCXX/conversion.cpp

 Done, attached.

> * You could change the NULL usage in conversion-gnunull.cpp to __null
> & drop the header to simplify/isolate the test case a bit further.
> (this is, perhaps, debatable - as it doesn't quite test the "real" use
> case)

 I've left this one as it is. I don't expect the header to break things and 
NULL is what people use in real programs, so in case it actually breaks, it's 
probably better to trigger it here too.

> and one question I can't answer that blocks me from signing
> off/checking this in for you:
> Is the change in lib/Driver/Tools.cpp necessary/correct? I don't fully
> understand what this list is for. Chandler helped me/speculated that
> this is a list of all Clang options that don't exist in GCC 4.2 - but
> if that's the case it's already broken (even by changes I've made -
> such as adding the -Wcovered-switch-default flag which I never added
> to this list). So I'm wondering where this list is tested/validated.
> Hopefully an Apple Clang developer can chime in here & explain this.

 I have no idea, obviously. I only followed usage of another conversion 
option. All I can say is that when removing this change passing
-Wno-conversion-null still disables the warning.

 Lubos Lunak
 l.lunak at suse.cz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-conversion-null.patch
Type: text/x-diff
Size: 5877 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120314/6b1978af/attachment.patch>

More information about the cfe-commits mailing list