This patch changes the way we handle -Wshadow-field so that we do not issue diagnostics for parameters in function declarations (as those are harmless), but we continue to diagnose parameters of function definitions.
Details
Details
Diff Detail
Diff Detail
Event Timeline
test/SemaCXX/warn-shadow.cpp | ||
---|---|---|
236 | Can you please also add one function with out-of-line definition? |
test/SemaCXX/warn-shadow.cpp | ||
---|---|---|
236 | Gladly! |
test/SemaCXX/warn-shadow.cpp | ||
---|---|---|
236 | Is this redundant now that you've added G? |
test/SemaCXX/warn-shadow.cpp | ||
---|---|---|
236 | Sort of. G eventually has a body whereas F does not -- one of the gates on this logic is a function named willHaveBody(), so a bit of redundancy here seems reasonable. |
Can you please also add one function with out-of-line definition?