[PATCH] Warn on suspicious increments/decrements in for loops
Jordan Rose
jordan_rose at apple.com
Fri May 31 10:38:56 PDT 2013
Seems reasonable to me, if we really do want this warning.
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:23-24
@@ +22,4 @@
+def warn_redundant_loop_iteration : Warning<
+ "variable %0 is both %select{decremented|incremented}1 in the loop header "
+ "and in the loop body">,
+ InGroup<LoopAnalysis>, DefaultIgnore;
----------------
Bikeshed: move "both" after "incremented".
http://llvm-reviews.chandlerc.com/D628
More information about the cfe-commits
mailing list