[cfe-dev] UsingShadowDecl everywhere?

Craig Silverstein csilvers at google.com
Fri Dec 17 02:07:36 PST 2010


I was looking at OverloadExpr::decls_begin() for an overloaded
function call.  My code was behaving oddly because I knew this decl
should be a function, but it wasn't.  It turns out it was (properly) a
UsingShadowDecl.  The decl's getTargetDecl() was the function decl I
was expecting.

But now I'm paranoid that UsingShadowDecl may come between me and the
'real' decl I desire, at any time.  For instance, could a CallExpr's
getCalleeDecl() return a UsingShadowDecl?  When else might a
UsingShadowDecl pop up unexpectedly?

I think I can safely ignore this decl, if I don't care about the fact
that the name came via a using declaration, right?  I just don't know
how my code can ignore this decl, too.  Maybe there are only a few
special cases that I havee to worry about.

craig



More information about the cfe-dev mailing list