[PATCH] D35932: [clang-tidy] Add integer division check
Alexander Kornienko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 27 07:55:58 PDT 2017
alexfh added inline comments.
================
Comment at: docs/clang-tidy/checks/bugprone-integer-division.rst:21-24
+ // Do not warn, there are signs of deliberateness.
+ sin(abs(3) / 5);
+ sin(1 + abs(1 + 7 / 2));
+ 1 << 2 / 3;
----------------
I'd argue that the presence of `abs` here doesn't add any signal, since the function has overloads both for integer and floating point types.
https://reviews.llvm.org/D35932
More information about the cfe-commits
mailing list