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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits