<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hello, I'm trying to bind a fieldDecl name but a find some problems. I have a matcher like this:<br><br><blockquote>DeclarationMatcher IHD__Matcher = recordDecl(<br> forEach(<br> fieldDecl(hasName(Name().bind("n")), hasType(type().bind("t"))).bind("ChildVar")<br> ),<br> isDerivedFrom(<br> recordDecl(<br> forEach(<br> fieldDecl(hasName(equalsBoundNode("n")), hasType(type(equalsBoundNode("t"))<br> ).bind("ParentVar")<br> )<br> )<br> )<br> ); <br><br></blockquote>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:<br><br><blockquote>AST_POLYMORPHIC_MATCHER(Name, AST_POLYMORPHIC_SUPPORTED_TYPES_1(void(internal::TypeList<string>))){<br> return Node.getName();<br> }<br><br></blockquote>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.<br> </div></body>
</html>