[cfe-commits] [PATCH] ThisExpr matcher

Manuel Klimek klimek at google.com
Mon Oct 22 04:14:46 PDT 2012


I also don't know whether one can rely on that... I think that thisExpr is
definitely a useful matcher.


On Mon, Oct 22, 2012 at 12:06 PM, Gábor Horváth <xazax.hun at gmail.com> wrote:

>
>   Oh, I come up with an example, where memberExpr do not work.
>
>   Consider:
>   struct Z {
>     int x;
>   };
>
>   class Y {
>       void x() {Z y; y.x;}
>   };
>
>   There is y.x is a memberExpr, however it is not belongs to the class Y,
> so it is not it's state.
>   In the AST as far as I can see, in this example the child of the
> memberExpr is a DeclRefExpr, however I don't know if it is safe to rely on
> that.
>
> http://llvm-reviews.chandlerc.com/D70
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121022/d553ff1c/attachment.html>


More information about the cfe-commits mailing list