[clang-tools-extra] r317838 - [clangd] Fix compilation database detection
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 9 13:45:28 PST 2017
Author: sammccall
Date: Thu Nov 9 13:45:27 2017
New Revision: 317838
URL: http://llvm.org/viewvc/llvm-project?rev=317838&view=rev
Log:
[clangd] Fix compilation database detection
Modified:
clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp
Modified: clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp?rev=317838&r1=317837&r2=317838&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp (original)
+++ clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp Thu Nov 9 13:45:27 2017
@@ -81,7 +81,7 @@ DirectoryBasedGlobalCompilationDatabase:
return CachedIt->second.get();
std::string Error = "";
auto CDB = tooling::CompilationDatabase::loadFromDirectory(File, Error);
- if (CDB && Error.empty()) {
+ if (CDB) {
auto Result = CDB.get();
CompilationDatabases.insert(std::make_pair(File, std::move(CDB)));
return Result;
More information about the cfe-commits
mailing list