JonasToth added a comment.


my 2 cents:

- On which codebases did you run the check?
- did you consider looking for `implicitCastExpr`? You can capture all 
narrowing conversion with that and analyze them further. I think it is possible 
to warn for the subset mentioned in the guidelines.
- you match for `binaryOperator("+=", "-")` maybe all assignments can be looked 
at?  (`binaryOperator(isASsignmentOperator())`, defined in 
clang-tidy/util/Matchers.h or similar) That includes all calculate-and-assign 
operations. Those should be equally dangerous.

  rCTE Clang Tools Extra

cfe-commits mailing list

Reply via email to