[cfe-dev] Clang Tooling: Run multiple tools with different args

madil90 madil90 at gmail.com
Tue Feb 12 08:34:00 PST 2013

   I have to run multiple tools in the same code using different set of
arguments for each (different source files). Seperately both tools work
fine. But when I run them both, the source path list in the second tool
contains all the source paths passed to the first tool too. How can I clear
the source path list? e.g.

CommonOptionsParser parser(size,Args);
ClangTool tool(parser.getCompilations(),parser.getSourcePathList());   //
source is test.cpp

CommonOptionsParser parser1(size1,Args1);
ClangTool tool2(parser1.getCompilations(),parser.getSourcePathList()); 
// source is test.cpp and test1.cpp in the above while Args1 contain only

    Is there a way to reset the whole toolig structure and run a completely
new tool on a new set of arguments in the same code? (I don't wanna make 4
tools and run them seperately).


View this message in context: http://clang-developers.42468.n3.nabble.com/Clang-Tooling-Run-multiple-tools-with-different-args-tp4030423.html
Sent from the Clang Developers mailing list archive at Nabble.com.

More information about the cfe-dev mailing list