Files
codeql/cpp/ql/src/Best Practices/Hiding/DeclarationHidesVariable.cpp
2018-09-23 16:23:52 -07:00

13 lines
188 B
C++

void f() {
int i = 10;
for (int i = 0; i < 10; i++) { //the loop counter hides the variable
...
}
{
int i = 12; //this variable hides the variable in the outer block
...
}
}