bool RemoveNamespaceRewriteVisitor::VisitTypedefTypeLoc(TypedefTypeLoc TyLoc) { const TypedefNameDecl *D = TyLoc.getTypedefNameDecl(); std::string Name; if (ConsumerInstance->getNewName(D, Name)) { SourceLocation LocStart = TyLoc.getBeginLoc(); ConsumerInstance->TheRewriter.ReplaceText( LocStart, D->getNameAsString().size(), Name); } return true; }
bool UnnecessaryIncludeFinder::VisitTypedefTypeLoc (TypedefTypeLoc typeLoc) { markUsed(typeLoc.getTypePtr()->getDecl()->getLocation(), typeLoc.getBeginLoc()); return true; }