[PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 7 17:12:27 PDT 2016


On Thu, Apr 7, 2016 at 5:05 PM, Reid Kleckner via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> rnk updated this revision to Diff 52982.
> rnk marked 3 inline comments as done.
> rnk added a comment.
>
> - Add -Wshadow-all and -Wshadow-field-in-constructor, also address review
> comments
>

Strikes me as strange that we're adding a new name for a flag that matches
the behavior of GCC's -Wshadow, rather than introducing the better one
under a new name. (that way people already using it would continue to get
the same behavior - people who came from GCC would get the same behavior
they were already getting, etc)

But I'll leave it to you guys to decide how that all shakes out.


>
>
> http://reviews.llvm.org/D18271
>
> Files:
>   include/clang/Basic/Diagnostic.h
>   include/clang/Basic/DiagnosticGroups.td
>   include/clang/Basic/DiagnosticSemaKinds.td
>   include/clang/Sema/Sema.h
>   lib/Sema/AnalysisBasedWarnings.cpp
>   lib/Sema/SemaDecl.cpp
>   lib/Sema/SemaExpr.cpp
>   test/SemaCXX/warn-shadow.cpp
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160407/61c546a6/attachment.html>


More information about the cfe-commits mailing list