[PATCH] A new warning, -Wtautological-array-compare, which warns when an array is compared against a null pointer

Richard Trieu rtrieu at google.com
Wed Jan 29 17:32:34 PST 2014


On Tue, Jan 28, 2014 at 10:16 PM, David Blaikie <dblaikie at gmail.com> wrote:

>
> On Tue, Jan 28, 2014 at 10:01 PM, Richard Trieu <rtrieu at google.com> wrote:
>
>> GCC's -Waddress doesn't catch this or (&x == 0).  GCC's -Waddress does
>> catch (x) for arrays, and (&x) for all types, but Clang doesn't.
>>
>
> Do you think your work would generalize/simplify to these cases? (even if
> it does, depending on how much work that is, it might still be worth doing
> this limited form you've done already - if it'd be easier to review it in
> two steps (if the second step is a logical extension to the first) rather
> than just reviewing the more general form)
>
>
Not sure at the moment.  I'll have a look at uniting and simplifying the
cases.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140129/9212f104/attachment.html>


More information about the cfe-commits mailing list