[PATCH] D35783: Ignore shadowing for declarations coming from within macros.
Manuel Klimek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 24 00:40:18 PDT 2017
klimek added a comment.
Your patch description sounds like you're only switching the warning off when the scope ends in a macro, but the patch looks different. For example:
#define M int x
int x;
void f() {
M;
x = 42; // the user probably meant ::x here
}
would also be suppressed now, right? It seems like we already have the DeclContext (which is the scope afaik), so NewDC->getEndLoc().isMacroID() might solve that?
https://reviews.llvm.org/D35783
More information about the cfe-commits
mailing list