[cfe-dev] Callee declarations and explicit casts

Chandler Carruth chandlerc at google.com
Wed Sep 14 22:18:23 PDT 2011


On Tue, Sep 13, 2011 at 4:27 PM, John McCall <rjmccall at apple.com> wrote:

> Now, it struck me (and Doug) as pretty suspect for getCalleeDecl()
> to ever look through an explicit cast, precisely because that's a
> potentially very important change in the call behavior.  Ergo, this
> change.  However, this is clearly a balance between clients who
> really don't care about explicit casts (and therefore would prefer
> getCalleeDecl() to look through them) and clients who haven't
> considered whether their analysis is reasonable in the face of
> explicit casts (and therefore would probably prefer
> getCalleeDecl() to not look through them).
>

FTR, I'm really in favor of your change, despite likely caring about a fair
amount of code that could be impacted. Specifically, I welcome having to
teach code to explicitly look through explicit casts. It ensures that the
reader and maintainer also consider in the future this behavior. Silently
looking through unexpected AST entities has been cited as a source of
confusion for several users we work with when trying to manipulate and
understand the AST.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110914/f12ffee5/attachment.html>


More information about the cfe-dev mailing list