[clangd] Fix compilation database detection
llvm-svn: 317838
This commit is contained in:
parent
f035b9d631
commit
39f457b36f
|
@ -81,7 +81,7 @@ DirectoryBasedGlobalCompilationDatabase::tryLoadDatabaseFromPath(PathRef File) {
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue