[PATCH] D41729: Add a tool executor that runs actions on all TUs in the compilation database.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 5 02:01:51 PST 2018

hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.


Comment at: include/clang/Tooling/AllTUsExecution.h:34
+  AllTUsToolExecutor(const CompilationDatabase &Compilations,
+                     unsigned ThreadCount,
+                     std::shared_ptr<PCHContainerOperations> PCHContainerOps =
consider using a default parameter (= 0)? use the `llvm::hardware_concurrency` by default, and you don't have to pass the `0` in the unittest.

Comment at: lib/Tooling/AllTUsExecution.cpp:157
+    X("all-TUs", "Runs FrontendActions on all TUs in the compilation database. "
+                 "Tool results are deduplicated by the result key.");
also document all results are stored in memory, the result size should be suitable to be loaded in memory.

Comment at: unittests/Tooling/ExecutionTest.cpp:264
+  std::vector<std::string> ExpectedSymbols;
+  for (unsigned i = 1; i <= NumFiles; i++) {
+    std::string File = "f" + std::to_string(i) + ".cc";
nit: ++i.

  rC Clang


More information about the cfe-commits mailing list