Shadowing is not enabled by default, update doc accordingly.
This commit is contained in:
parent
a26280bc14
commit
f203ecc621
1 changed files with 3 additions and 4 deletions
|
@ -343,10 +343,9 @@ Strings and formatting
|
||||||
Variable names
|
Variable names
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
The shadowing warning (`-Wshadow`) is enabled by default. It prevents issues rising
|
Although the shadowing warning (`-Wshadow`) is not enabled by default (it prevents issues rising
|
||||||
from using a different variable with the same name.
|
from using a different variable with the same name),
|
||||||
|
please name variables so that their names do not shadow variables defined in the source code.
|
||||||
Please name variables so that their names do not shadow variables defined in the source code.
|
|
||||||
|
|
||||||
E.g. in member initializers, prepend `_` to the argument name shadowing the
|
E.g. in member initializers, prepend `_` to the argument name shadowing the
|
||||||
member name:
|
member name:
|
||||||
|
|
Loading…
Reference in a new issue