[PATCH] D45007: [clangd] Use compile-command interpolation to provide commands for header files.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 9 08:25:15 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL329582: [clang] Use compile-command interpolation to provide commands for header files. (authored by sammccall, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D45007

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


Index: clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp
===================================================================
--- clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp
+++ clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp
@@ -86,6 +86,8 @@
     return CachedIt->second.get();
   std::string Error = "";
   auto CDB = tooling::CompilationDatabase::loadFromDirectory(Dir, Error);
+  if (CDB)
+    CDB = tooling::inferMissingCompileCommands(std::move(CDB));
   auto Result = CDB.get();
   CompilationDatabases.insert(std::make_pair(Dir, std::move(CDB)));
   return Result;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45007.141661.patch
Type: text/x-patch
Size: 614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180409/beb6be38/attachment.bin>


More information about the cfe-commits mailing list