[PATCH] D35783: Ignore shadowing for declarations coming from within macros.
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 17 11:40:05 PST 2018
rsmith added a comment.
I think the ideal solution would be something like:
If a variable produced by a macro expansion shadows a variable not produced by a macro expansion, do not warn immediately. Instead, warn if we see a use of the inner variable in a context that is not produced by the same macro expansion (more broadly: for each point of use, if there is no macro expansion that contains both the point of declaration of the inner variable and all points of use, then warn). As an approximation to this, we could suppress the warning only if the (start of the) scope containing the inner variable and the inner variable itself were produced by the same macro expansion.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D35783/new/
https://reviews.llvm.org/D35783
More information about the cfe-commits
mailing list