https://github.com/5chmidti commented:
Basically LGTM, but the name `WarnOnArithmeticWithDivisionBySizeOf` would imply that ```c++ (Buffer - Buffer) / sizeof(*Buffer); ``` would be ignored as well when the flag is `false`. Please add something in the documentation about this. The option could also be renamed of course. I don't really have a name that stands out as best, but here some ideas: - `WarnOnOffsetByScaledDownSize` - `WarnOnOffsetDividedBySizeOf` (this one comes closer to the above example again) (non-blocking on renaming the option) https://github.com/llvm/llvm-project/pull/111178 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits