[cfe-dev] UsingDecl vs UsingShadowDecl
Richard Smith via cfe-dev
cfe-dev at lists.llvm.org
Sun Apr 30 21:28:55 PDT 2017
On 30 Apr 2017 2:04 pm, "Kim Gräsman via cfe-dev" <cfe-dev at lists.llvm.org>
wrote:
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?
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.
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.
Thanks,
- Kim
_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170430/d1fada13/attachment.html>
More information about the cfe-dev
mailing list