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.
I have been matching with something like
recordDecl(isDerivedFrom(Class->getName().str())) where Class is of type
CXXRecordDecl*.
Is there a possibility that it would match a type with the same name as
Class but in a different namespace?
Yep.
Is there a way to just pass the CXXRecordDecl or associated Type to the
AST matcher?
1. you can use '::ns::MyClass' to only match fully qualified names
2. if you're doing match-in-match, and you already have a CXXRecordDecl,
you can use isDerivedFrom(recordDecl(equalsNode(yourRecordDecl)))