Questions about using Clang for source to source transformation.

Hello,

I’m working in a project involving source to source transformation of some arbitrary c code , I’m looking forward to using Clang
my main problem is where to start , I can find approx. no documentation on topic

Any existing source to source sample codes based on clang that can be of help as a starting point ?

I want to know the Clang APIs for building a AST and rewriting codes from the AST.

Thanks.

Actually, the best source to source transformer example is the ObjC Rewriter (see lib/FrontEnd/RewriteObjC.cpp).

– Jean-Daniel

hi mywayin2sky
llvm/tools/clang/examples/ and llvm/tools/clang/include/clang-c/ maybe helpful.
wpa is a tool display Call-Graph.
Liu

2010/5/6 mywayin2sky <mywayin2sky@gmail.com>