[PATCH] D73628: [clangd] Log directory when a CDB is loaded

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 30 03:15:22 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG4fb1adcde22c: [clangd] Log directory when a CDB is loaded (authored by kadircet).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73628

Files:
  clang-tools-extra/clangd/GlobalCompilationDatabase.cpp


Index: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
===================================================================
--- clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
+++ clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
@@ -115,9 +115,11 @@
   auto R = CompilationDatabases.try_emplace(Key);
   if (R.second) { // Cache miss, try to load CDB.
     CachedCDB &Entry = R.first->second;
-    std::string Error = "";
+    std::string Error;
     Entry.CDB = tooling::CompilationDatabase::loadFromDirectory(Dir, Error);
     Entry.Path = std::string(Dir);
+    if (Entry.CDB)
+      log("Loaded compilation database from {0}", Dir);
   }
   return R.first->second;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73628.241389.patch
Type: text/x-patch
Size: 691 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200130/a2421040/attachment.bin>


More information about the cfe-commits mailing list