newbie wants to do round-trip, source to source C parsing

Hello! I discovered clang from this thread:
http://stackoverflow.com/questions/239722/ast-from-c-code

The example link in the thread describing how to perform 'source to
source' parsing and re-writing using clang doesn't work anymore :frowning:
Can anybody give links and/or hints and tips on how to do this and
where to start?

Thanks, Simon

Check out the Rewriter class, which helps with rewriting specific parts of the source without disturbing the rest of the source. Also, look at the Objective-C rewriter in lib/Frontend/RewriteObjc.cpp.

  - Doug