[cfe-dev] Implementing an analysis pass in clang?
Alexander MacDonald
alexmac at adobe.com
Sun Aug 22 16:27:18 PDT 2010
Hi clang devs! I'd like to write a simple analysis in clang that warns you when a header file has unnecessarily dragged in other includes when a set of forward declarations would have sufficed. I'm not all that familiar with the clang codebase yet so I'm looking for some pointers to get me started. I assume the way I should do this is implement an ASTConsumer and hook it up so that it gets run just after a single .h has been parsed? It's not obvious to me where I would do this, there doesn't seem to be the equivalent of the llvm function/module pass system in clang... or maybe I'm just not looking in the right place.
Thanks,
Alex
More information about the cfe-dev
mailing list