UsingDecl vs UsingShadowDecl

Hi all,

I'm having trouble understanding what the respective Decls represent.

When would there be more than one UsingShadowDecl for a UsingDecl?
When would there be none? Why is the target decl only reachable from
the shadows?

I'm about to fix a bug in IWYU where we have a UsingDecl without any
shadows, but I wanted to make sure I understand the concepts before
committing to anything.

- Kim

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.

Hi Richard,