S1264 states that a while loop should be used when only the condition expression is defined in a for loop. This makes sense:
Noncompliant code example
for (;condition;) { /*...*/ }
Compliant solution
while (condition) { /*...*/ }
However, the warning fires when the variable is declared outside of a for loop. While rare, there are cases when one may do this, and no rule states one cannot do so.
The rule considers anything else than a declaration in the initializer section of the for statement as non-compliant. We will update the rule description to match this requirement.