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

LG apart from the second global CDB



================
Comment at: clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp:128
+      : IndexStorageMapMu(llvm::make_unique<std::mutex>()),
+        CDB(llvm::make_unique<DirectoryBasedGlobalCompilationDatabase>(
+            llvm::None)) {
----------------
Why does this have its own CDB? AFAICS it can use the shared CDB, possibly 
indirecting through a std::function


================
Comment at: clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp:149
+  std::unique_ptr<BackgroundIndexStorage> create(PathRef CDBDirectory) {
+    assert(!CDBDirectory.empty() &&
+           "Tried to create storage for empty directory!");
----------------
This assertion will be hit if home_directory() fails. It shouldn't, but... 
maybe keep the "return nullstorage" to cover this case (and also the assert?)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64745



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to