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

Ben Craig via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 23 11:20:33 PDT 2016


bcraig added a subscriber: bcraig.
bcraig added a comment.

In http://reviews.llvm.org/D18271#381744, @thakis wrote:

> FWIW we don't currently use this warning on Chromium because it's way to noisy. So something like this looks like a great change to me.
>
> dblaikie, are you aware of any codebases that use this warning in its current form?


Not dblaikie, but I've used the GCC version of -Wshadow on reasonably large code bases before.  The ctor pattern that this is trying to squelch was certainly a significant portion of the warnings, particularly when (old) boost headers got involved.

I believe that newer versions of boost (~1.50 and newer?) attempt to be -Wshadow clean in the headers.


http://reviews.llvm.org/D18271





More information about the cfe-commits mailing list