This is a warning for when the increment/decrement in a for loop does not match the condition in the loop. If the condition has a relational operator, one operand can be deduced to be the larger value and the other operand the smaller value when the loop is run. For the loop to terminate, the smaller value needs to increase or the larger value needs to decrease, while the opposite will cause the loop to not terminate.
Correct:
for (...; x < y; ++x) {} for (...; x < y; --y) {}
Incorrect:
for (...; x < y; --x) {} for (...; x < y; ++y) {}
The warning comes with two attached notes. One is to flip the direction of the comparison (">" to "<", etc) and other is to change the increment decrement step ("--" to "++" or vice versa).
An exception is made for unsigned values, since some code uses the unsigned overflow/underflow characteristics.
Please don't use auto unless type is spelled in same statement or iterator.