A few more cases:
int main() {
int n = 0;
for( int n = 0; n < 10; ++n ) {
}
++n;
return 0;
}
1) Move cursor to int n = 0
Try to rename 'n'. The following line changes though it should not for( int n = 0; n < 10; ++n ) {
2) Move cursor to for( int n = 0; n < 10; ++n ) {
Try to rename 'n'. The following line changes though it should not int n = 0