[PATCH] D26278: Avoid -Wshadow warnings for shadowed variables that aren't captured by lambdas with an explicit capture list
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 8 09:14:39 PST 2016
rnk added inline comments.
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:361
+def warn_decl_shadow_all :
+ Warning<"declaration shadows a %select{"
+ "local variable|"
----------------
Use the .Text accessor like we do here to avoid repeating the text:
```
def warn_objc_pointer_masking : Warning<
"bitmasking for introspection of Objective-C object pointers is strongly "
"discouraged">,
InGroup<ObjCPointerIntrospect>;
def warn_objc_pointer_masking_performSelector : Warning<warn_objc_pointer_masking.Text>,
```
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:366
+ "field of %2}1">,
+ InGroup<ShadowAll>, DefaultIgnore;
def warn_ctor_parm_shadows_field:
----------------
Richard seemed to feel it was important to have a -Wshadow-field-in-constructor, so we should probably add a -Wshadow-uncaptured-local and put that in -Wshadow-all.
Repository:
rL LLVM
https://reviews.llvm.org/D26278
More information about the cfe-commits
mailing list