[PATCH] D61422: [clang-tidy] Extend bugprone-sizeof-expression check to detect sizeof misuse in pointer arithmetic

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 3 05:53:39 PDT 2019


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

In D61422#1489159 <https://reviews.llvm.org/D61422#1489159>, @baloghadamsoftware wrote:

> In D61422#1488081 <https://reviews.llvm.org/D61422#1488081>, @aaron.ballman wrote:
>
> > Out of curiosity, have you run this over any large code bases to see what the false positive and true positive rate is?
>
>
> Neither false, nor true positives found so far. I ran it on several open-source projects.


Hmm, I am a little bit skeptical about the utility of this compared to the expense of making the check marginally slower. However, I don't have any specific objections and so I'm not opposed to the patch. LG!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61422/new/

https://reviews.llvm.org/D61422





More information about the cfe-commits mailing list