[PATCH] D54865: [clangd] Auto-index watches global CDB for changes.

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 26 01:24:41 PST 2018


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

LGTM, seems to share a lot of context with what I am preparing for loading shards.
Interfaces looks compatible with what I had before, only difference is it was more `tooling::CompileCommand` oriented before, now it can only look at filenames, which seems more natural.

Thanks!



================
Comment at: clangd/index/Background.cpp:115
+
+    // We shuffle the files so because processing them in a random order should
+    // quickly give us good coverage of headers in the project.
----------------
s/so //


================
Comment at: clangd/index/Background.cpp:130
+  if (auto Cmd = CDB.getCompileCommand(File, &Project)) {
+    auto *Storage = IndexStorageFactory(Project.SourceRoot);
+    enqueueTask(Bind(
----------------
In case of an OverlayCDB with some commands set through LSP configuration, we might end up `Project.SourceRoot` being an empty string, which will result in creating the index storage directory in cwd. I believe we wouldn't want that, but not sure if it should be handled by `BackgroundIndex` or `DiskBackedIndexStorage`. WDYT?


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D54865





More information about the cfe-commits mailing list