[cfe-dev] UsingDecl vs UsingShadowDecl

Kim Gräsman via cfe-dev cfe-dev at lists.llvm.org
Mon May 1 01:00:18 PDT 2017


Hi Richard,

On Mon, May 1, 2017 at 6:28 AM, Richard Smith <richard at metafoo.co.uk> wrote:
>
> The UsingDecl represents the source declaration "using X::Y;"
> Each UsingShadowDecl represents one declaration that was made visible to
> name lookup by the UsingDecl.
>
> There can be multiple UsingShadowDecls if the UsingDecl names an overload set.
> There can be zero if all the declarations for a class scope UsingDecl are hidden by
> derived class members.

It sounds so easy when spelled out like that :-)

And I see now that the UsingShadowDecl is necessary as the link
between the UsingDecl and the target decl, so that resolution can be
made both ways.

Thanks!

- Kim



More information about the cfe-dev mailing list