<div>Hello!</div><div>How can we run ClangTool based AST action over multiply source files.</div><div> </div><div>For example command line tool:</div><div><div>./loop-convert --extra-arg-before=-I'/media/sf_share/llvm_9/llvm9-build/lib/clang/9.0.0/include' \</div><div>-p '/home/fvmu/scnd_disk/my_projects/for_code_data_divider/busybox-1.32.0' \</div><div>'/home/fvmu/scnd_disk/my_projects/for_code_data_divider/busybox-1.32.0/libbb/rtc.c' '/home/fvmu/scnd_disk/my_projects/for_code_data_divider/busybox-1.32.0/libbb/ubi.c' '/home/fvmu/scnd_disk/my_projects/for_code_data_divider/busybox-1.32.0/libbb/dump.c' '/home/fvmu/scnd_disk/my_projects/for_code_data_divider/busybox-1.32.0/libbb/loop.c' '/home/fvmu/scnd_disk/my_projects/for_code_data_divider/busybox-1.32.0/libbb/mtab.c' '/home/fvmu/scnd_disk/my_projects/for_code_data_divider/busybox-1.32.0/libbb/read.c'</div><div> </div><div> </div><div>and code (taken from https://clang.llvm.org/docs/LibASTMatchersTutorial.html)</div><div> <div>CommonOptionsParser OptionsParser(argc, argv, MyToolCategory);</div><div>ClangTool Tool(OptionsParser.getCompilations(), OptionsParser.getSourcePathList());</div><div>LoopPrinter Printer;</div><div>MatchFinder Finder;</div><div>Finder.addMatcher(LoopMatcher, &Printer);</div><div>return Tool.run(newFrontendActionFactory(&Finder).get());</div><div> </div><div> </div><div> </div><div>I can iterate over the compilation database entries inside my program or write python wrapper. But I beleive there is an easier way.</div></div><div>newFrontendActionFactory(&Finder).get() works only for last source file in list (libbb/read.c). So how can I match AST nodes over multiply TU in one clang tool?</div><div><div> </div></div></div>