Hi all,<div><br></div><div>we are working on source-to-source transformation tool based on clang and have a following problem. Example code:</div><div><br></div><div>void foo()</div><div>{</div><div>  typedef int i32;</div>
<div>  typedef i32 s32;</div><div>  typedef i32 (*pfun)();</div><div><br></div><div>  i32 a = (s32)0x1234u;</div><div>}</div><div><br></div><div>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.</div>
<div><br></div><div>What would be a working (best?) way to do it?</div><div><br></div><div>Thanks,</div><div>Sergejs</div><div><br></div>