This rule is valid not only for function parameters of function definitions but also for iteration and conditional statements and for exceptions handlers
3.3.3 Block scope
2 The potential scope of a function parameter name (including one
appearing in a lambda-declarator) or of a function-local predefined
variable in a function definition (8.4) begins at its point of
declaration. If the function has a function-try-block the potential
scope of a parameter or of a function-local predefined variable ends
at the end of the last associated handler, otherwise it ends at the
end of the outermost block of the function definition. A parameter
name shall not be redeclared in the outermost block of the function
definition nor in the outermost block of any handler associated with a
function-try-block.
3 The name declared in an exception-declaration is local to the
handler and shall not be redeclared in the outermost block of the
handler.
4 Names declared in the for-init-statement, the for-range-declaration,
and in the condition of if, while, for, and switch statements are
local to the if, while, for, or switch statement (including the
controlled statement), and shall not be redeclared in a subsequent
condition of that statement nor in the outermost block (or, for the if
statement, any of the outermost blocks) of the controlled statement;
see 6.4.
For example this code snippet is invalid
if( int x = SomeFunction() )
{
int x; // invalid declaration
//...
}