[cfe-dev] Proposal: -Wshadow-field flag
Ehsan Akhgari
ehsan.akhgari at gmail.com
Tue Apr 21 15:05:07 PDT 2015
On Tue, Apr 21, 2015 at 5:30 PM, Reid Kleckner <rnk at google.com> wrote:
> On Tue, Apr 21, 2015 at 2:01 PM, Ehsan Akhgari <ehsan.akhgari at gmail.com>
> wrote:
>
>> On Mon, Apr 20, 2015 at 5:33 PM, Reid Kleckner <rnk at google.com> wrote:
>>
>>> I think this would be a great addition! In general, -Wshadow fires in a
>>> lot of situations, and I think having more granularity here is helpful for
>>> users.
>>>
>>
>> Note that -Wshadow doesn't diagnose this specific case, so my proposal
>> isn't really a subset of -Wshadow.
>>
>
> Right, this sounds like a new and useful warning by itself.
>
Great to hear that. I'll give it a shot then. :-)
> I was mostly saying this seems like the right direction. The existing
> checks under -Wshadow are both too little and too much. Having more checks
> and more granular flags will help us explore the space.
>
Yeah, agreed. For those interested, this is a good read on why we decided
to not turn on -Wshadow whole-sale for Mozilla: <
https://bugzilla.mozilla.org/show_bug.cgi?id=563195#c15>.
Cheers,
--
Ehsan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150421/40fa072f/attachment.html>
More information about the cfe-dev
mailing list