Problem binding a fieldDecl name

Hello, I’m trying to bind a fieldDecl name but a find some problems. I have a matcher like this:

DeclarationMatcher IHD__Matcher = recordDecl(
forEach(
fieldDecl(hasName(Name().bind(“n”)), hasType(type().bind(“t”))).bind(“ChildVar”)
),
isDerivedFrom(
recordDecl(
forEach(
fieldDecl(hasName(equalsBoundNode(“n”)), hasType(type(equalsBoundNode(“t”))
).bind(“ParentVar”)
)
)
)
);

It searchs for an attribute in a child class that has the same name and type as the father’s attribute . I’ve tried using macros, but i always get conversion errors:

AST_POLYMORPHIC_MATCHER(Name, AST_POLYMORPHIC_SUPPORTED_TYPES_1(void(internal::TypeList))){
return Node.getName();
}

There is a way to do this without using macros? I’ve been searching in the AST Matcher Reference, but I can’t find what i need.