[PATCH] D71001: [Clang-Tidy] New check: bugprone-misplaced-pointer-arithmetic-in-alloc
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 4 11:47:35 PST 2019
aaron.ballman added a comment.
In D71001#1769048 <https://reviews.llvm.org/D71001#1769048>, @gribozavr2 wrote:
> In D71001#1769035 <https://reviews.llvm.org/D71001#1769035>, @Eugene.Zelenko wrote:
>
> > > ASan can help debug this issue, and more.
> >
> > This is dynamic analysis, and detection of problem depends on test case. Detection of such problem during static analysis makes sense.
>
>
> As is, this check targets a very narrow pattern, and is very easy to fool with the same code split across multiple statements. I don't think it pulls its weight.
It's not uncommon to ask the author to run the check over several large corpora of code to see what the false positive and true positive rates are. Not finding any true positives may mean that the check needs a bit more justification (like publications talking about the issue, etc).
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71001/new/
https://reviews.llvm.org/D71001
More information about the cfe-commits
mailing list