[cfe-dev] UsingShadowDecl everywhere?
John McCall
rjmccall at apple.com
Fri Dec 17 08:00:35 PST 2010
On Dec 17, 2010, at 2:07 AM, Craig Silverstein wrote:
> 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?
Shadow declarations should only show up in "found" declarations,
which I think are only ever stored as part of a DeclAccessPair.
Otherwise we should already have looked through the shadow decl.
John.
More information about the cfe-dev
mailing list