We want to rename i32, s32, pfun and all their occurrences in this function. We tried using VisitDeclRefExpr from clang::RecursiveASTVisitor, but it didn’t walk through typedefs. We tried to use VisitTypedefType and it correctly visited all occurrences of i32/s32 for this function, but we haven’t figured out how to get location information from clang::TypedefType to make actual renaming possible.
We want to rename i32, s32, pfun and all their occurrences in this
function. We tried using VisitDeclRefExpr from clang::RecursiveASTVisitor,
but it didn't walk through typedefs. We tried to use VisitTypedefType and
it correctly visited all occurrences of i32/s32 for this function, but we
haven't figured out how to get location information from clang::TypedefType
to make actual renaming possible.
What would be a working (best?) way to do it?
Visit the corresponding TypeLoc (in this case VisitTypedefTypeLoc)