[PATCH] D139114: [Clang][Sema] Enabled implicit conversion warning for CompoundAssignment operator.

Nathan Chancellor via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 13 17:18:42 PST 2023


nathanchance added a comment.

For what it’s worth, this triggers a LOT in the Linux kernel for the pattern that @MaskRay pointed out:

https://gist.github.com/nathanchance/a76c2ba0a22dda3251c4ec5ee9e3f285

  $ rg -c -- -Wconstant-conversion $TMP_FOLDER/4c37671a7c946ac246b52fa44a6a649b89d6310b-build.log
  28364

The breakdown shows that one site in a common header is responsible for 19,352 of those instances, but there are a lot of one off instances, which will take a long time to fix:

https://gist.github.com/nathanchance/85338a1e0693590cc93dba1d3e0bb050

It would be nice if this was split into a separate flag that could be disabled, as -Wconstant-conversion has not been very noisy up until this point.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139114



More information about the cfe-commits mailing list