<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 26, 2014 at 11:42 PM, Daniel Dilts <span dir="ltr"><<a href="mailto:diltsman@gmail.com" target="_blank">diltsman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I am attempting to rename a class.  I have matched the CXXRecordDecl that I want to rename, and I can rename the class declaration/definition.</div>
<div><br></div><div>I have been matching with something like recordDecl(isDerivedFrom(Class->getName().str())) where Class is of type CXXRecordDecl*.</div>
<div><br></div><div>Is there a possibility that it would match a type with the same name as Class but in a different namespace?</div></div></blockquote><div><br></div><div>Yep.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Is there a way to just pass the CXXRecordDecl or associated Type to the AST matcher?</div></div></blockquote><div><br></div><div>1. you can use '::ns::MyClass' to only match fully qualified names</div>
<div>2. if you're doing match-in-match, and you already have a CXXRecordDecl, you can use isDerivedFrom(recordDecl(equalsNode(yourRecordDecl)))</div><div><br></div><div>Cheers,</div><div>/Manuel</div></div></div></div>