[PATCH] D75665: [analyzer] On-demand parsing capability for CTU

Endre Fülöp via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 27 07:29:36 PDT 2020


gamesh411 marked an inline comment as done.
gamesh411 added inline comments.


================
Comment at: clang/lib/CrossTU/CMakeLists.txt:13
   clangIndex
+  clangTooling
+  clangSerialization
----------------
thakis wrote:
> We've been very careful to make clang (the compiler binary) only depend on clangToolingCore and not on the much bigger clangTooling library. Since clang depends on the CrossTU library, this breaks that. Can you reorganize things so that we don't need a dependency from clang-the-compiler-binary on clangTooling?
I have gone, and investigated where the main functionality of on-demand AST loading comes from. (Only after wishfully thinking changing the dependency from `clangTooling` to `clangToolingCore` would work, which of course didnt't )

It seems that this functionality used the major components of `clangTooling`, namely `JSONCompilationDatabase::loadFromFile`, `ClangTool ctor/dtor`, `ClangTool::buildAST`.
In order to circumvent the dependency and the reimplementation of handling compilation databases, a call to an external tool could be used, or the clangTooling library would need to be refactored in a way which is not a very tasteful refactoring. IMHO. I would like to know which of the aforementioned way is deemed to be best.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75665/new/

https://reviews.llvm.org/D75665





More information about the cfe-commits mailing list