[PATCH] D24861: [Sema] extend Wshift-op-parentheses so it warns for multiplicative operators
Richard Trieu via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 3 17:28:22 PDT 2016
On Sat, Oct 1, 2016 at 9:34 AM, Joerg Sonnenberger via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> On Fri, Sep 30, 2016 at 03:41:53PM -0700, Richard Trieu via cfe-commits
> wrote:
> > Currently, this warning is on by default. As you said, the results you
> > found look intentional in many cases, so there is a high false positive
> > rate. For on by default warnings, we expect a high true positive rate
> and
> > intend for users to not disable the warning. From my analysis on a
> > separate codebase, I found less than 10% true positive rate out of 200
> > warnings. One option might be to move this warning to a subgroup, which
> > would leave it discoverable from either -Wall or -Wparentheses, but not
> > have it on by default.
>
> We are now only talking about the right shift version, are we? That
> seems to me to be much less intrusive, but should belong into the same
> subgroup as the add checks.
>
> Joerg
>
I used the updated patch for the warning, which has both left and right
shifts, with an exception for "A * B << C". The number of right shift
versus left shift warnings is similar with similar true positive rate.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161003/2445d6fe/attachment.html>
More information about the cfe-commits
mailing list