[PATCH] D53974: [clang-tidy] new check: bugprone-too-small-loop-variable
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 1 11:36:53 PDT 2018
JonasToth added a comment.
But that reasoning would apply to `if` and `while` loops, as it might be
an "always true". But you are right, this case is not generally problematic.
long size = 300000;
short index = 100;
// Opposite comparison
if(index > size) {
// ....
}
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53974
More information about the cfe-commits
mailing list