I also don't know whether one can rely on that... I think that thisExpr is definitely a useful matcher.<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 22, 2012 at 12:06 PM, Gábor Horváth <span dir="ltr"><<a href="mailto:xazax.hun@gmail.com" target="_blank">xazax.hun@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Oh, I come up with an example, where memberExpr do not work.<br>
<br>
Consider:<br>
struct Z {<br>
int x;<br>
};<br>
<br>
class Y {<br>
void x() {Z y; y.x;}<br>
};<br>
<br>
There is y.x is a memberExpr, however it is not belongs to the class Y, so it is not it's state.<br>
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.<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D70" target="_blank">http://llvm-reviews.chandlerc.com/D70</a><br>
</blockquote></div><br></div>