[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 4 14:27:34 PDT 2018
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
Yep, looks good. This limitation to `DeclRefExpr`s was super conservative.
I'll follow up regarding the bugprone category in a week or so on the mailing lists. It's been a long-standing historical decision that the Analyzer, for the sake of good user experience, should only warn on real bugs and have low false positive rates, but there definitely is a desire for more advanced users to opt-in into reasonable lint / coding standard checks, so we really need some room for them, and a way of discriminating them from checks that are simply bad due to large amounts of inevitable false positives.
In https://reviews.llvm.org/D46081#1079231, @whisperity wrote:
> While I understand extending the analyzer to cover more is a good approach, there is `-Wconversion` which seemingly covers this -- or at least the trivial case(?):
Yeah, this check historically was an attempt on a quieter and at the same time more powerful alternative to `-Wconversion`.
https://reviews.llvm.org/D46081
More information about the cfe-commits
mailing list