On Mon, Apr 23, 2018 at 5:17 PM, Paolo Carlini <paolo.carl...@oracle.com> wrote:
> Hi,
>
> this issue is by and large fixed in trunk, thus I wanted to resolve it as
> such, marking it as fixed for 8.1.0. However the text of the warning is
> misleading / wrong:
>
>     declaration of ‘mVar’ shadows a previous local
>
> where in fact the shadowed declaration isn't local, is a static data member
> of the class. It seems to me that we should simply not handle such static
> old decls in the conditional block handling locals shadowing other locals,
> thus handle those below, together with other non-static member declarations.
> Tested x86-64-linux.

!TREE_STATIC seems like the wrong test here; that's also true for
static local variables.

Maybe check DECL_FUNCTION_SCOPE_P instead?

Jason

Reply via email to