[PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 7 17:09:19 PDT 2016
rnk added inline comments.
================
Comment at: lib/Sema/SemaDecl.cpp:6489-6490
@@ +6488,4 @@
+ ShadowedDeclKind Kind = computeShadowedDeclKind(ShadowedDecl, OldDC);
+ Diag(Loc, diag::warn_modifying_shadowing_decl) << D << Kind << OldDC;
+ Diag(ShadowedDecl->getLocation(), diag::note_previous_declaration);
+
----------------
rsmith wrote:
> Could be useful to also note the location of the shadowing decl.
Sure, done. I reused and renamed a note from uninit variable diagnostics.
http://reviews.llvm.org/D18271
More information about the cfe-commits
mailing list