[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)
Chris Warner via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 10 13:12:21 PDT 2024
cwarner-8702 wrote:
> Actually it's oposite. Simply when -Winteger-overflow is enabled, then IgnoreConstantIntExpr can be set to true, to avoid duplicated warnings. For me IgnoreConstantIntExpr should even by ON by default.
Sorry, I'm still struggling to see the connection. Maybe I'm getting too caught up on the fact one's for the compiler, the other is for clang-tidy, and they don't affect one another. If both are enabled, you will still get duplicated warnings if there is in fact an overflow problem. The change here is that if there isn't a real overflow problem, `IgnoreConstantIntExpr` will be silent just like `-Winteger-overflow` will.
So it just brings them into alignment.
> For me IgnoreConstantIntExpr should even by ON by default.
I was trying to minimize impact, but I'm certainly open to it. :-)
https://github.com/llvm/llvm-project/pull/98352
More information about the cfe-commits
mailing list