Code Refactoring

Hi,
   I need to do some code refactoring. I am basically trying to find all
"#include " statements (check for duplicates and add a few of my own etc). I
tried to parse the AST but I realized that the preprocessor has already
converted these statements (to code). Is there any FrontendAction that I can
invoke allowing me to detect and stop at these statements?

PPCallbacks? http://clang.llvm.org/doxygen/classclang_1_1Preprocessor.html#a671c7ba389abdc470a76ca6e40b3158d

Are you using Lex? LexUnexpandedToken