Clang / AST Matcher help

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

Hi,

Never mind. I found the solution:

memberCallExpr(thisPointerType(recordDecl(hasName(“SomeType”))))).bind(“SomeTypeCall”);

/J