Matcher with expressions

I’m not sure what the question is. You do not want definitions of what?

What I need is to find every call to a parent class constructor. Regarding the example I put, I want to match the invokation “A()” and I’m pretty lost in this case…

Use hasType to match on the type of an expression.

Ok, that’s good. But, I don’t know how could I express that the type is a constructorDecl from a parent class…

Thanks,

Pedro.

El día 26 sep 2013 11:19, Manuel Klimek klimek@google.com escribió:

Something like (untested):
constructExpr(hasDeclaration(methodDecl(ofClass(recordDecl().bind(“constructedType”)))), hasAncestor(methodDecl(ofClass(recordDecl(isDerivedFrom(equalsBoundNode(“constructedType”))))))).bind(“constructExpr”)

Cheers,
/Manuel