[cfe-dev] Clang / AST Matcher help

Jonas Bülow jonas.bulow at gmail.com
Tue Sep 10 13:13:55 PDT 2013


Hi,

Never mind. I found the solution:

memberCallExpr(thisPointerType(recordDecl(hasName("SomeType")
)))).bind("SomeTypeCall");

/J


On Tue, Sep 10, 2013 at 9:57 PM, Jonas Bülow <jonas.bulow at gmail.com> wrote:

> Hi,
>
> Using this AST matcher:
>
>
> memberCallExpr(on(hasType(recordDecl(hasName("SomeType"))))).bind("SomeTypeCall");
>
> I can match calls like X.Foo() when X is of type SomeType.
>
> I can't figure out how to write a matcher for calls on the form X->Foo().
> Any hints?
>
>
> Regards,
>    Jonas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130910/0bf39554/attachment.html>


More information about the cfe-dev mailing list