[cfe-commits] PATCH: Enhance array bounds checking

Kaelyn Uhrain rikka at google.com
Mon Jul 18 17:18:46 PDT 2011


Ted,

On Thu, Jul 14, 2011 at 5:04 PM, Ted Kremenek <kremenek at apple.com> wrote:

>
> The only other issue: should this be controlled under a separate warning
> flag, at least initially so we can experiment with this new warning and see
> how noisy it is?  E.g. "-Warray-bounds-pointer-arithmetic".
>

I've tested the -Warray-bounds changes against the Google codebase and my
patch increases the number of warnings from -Warray-bounds by 24%. Of the
new warnings, 57.33% are for array indexes that most likely weren't picked
up before because of unary operators like & or * (11.1% of all the warnings
now emitted), and the remaining 42.67% are from out-of-bounds pointer
arithmetic (8.3% of all the warnings from -Warray-bounds).

Cheers,
Kaelyn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110718/98abc5fd/attachment.html>


More information about the cfe-commits mailing list