[cfe-dev] ClangTool on multiple files with same Consumer

Vane, Edwin edwin.vane at intel.com
Mon Jun 10 17:42:48 PDT 2013


ClangTool takes a FrontendActionFactory so you can simply create your own. You're probably using newFrontendActionFactory() which expects newASTConsumer() to exist to call. However, if you create your own factory you can do whatever you like.

> -----Original Message-----
> From: cfe-dev-bounces at cs.uiuc.edu [mailto:cfe-dev-bounces at cs.uiuc.edu] On
> Behalf Of Lukas Vogel
> Sent: Monday, June 10, 2013 5:53 PM
> To: clang-dev Developers
> Subject: [cfe-dev] ClangTool on multiple files with same Consumer
> 
> Hi everyone.
> 
> Is there some nice way to run a Tool on multiple TranslationUnits without the
> need to recreate the ASTConsumer every time? (unlike ClangTool::run()).
> 
> Thanks for any suggestions or hints.
> 
> Lukas




More information about the cfe-dev mailing list