summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/GlobalCompilationDatabase.cpp')
-rw-r--r--clang-tools-extra/clangd/GlobalCompilationDatabase.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
index d2a10baeb5b..055f92c4734 100644
--- a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
+++ b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
@@ -87,6 +87,8 @@ DirectoryBasedGlobalCompilationDatabase::getCDBForFile(
Project->SourceRoot = Path;
}
}
+ // FIXME: getAllFiles() may return relative paths, we need absolute paths.
+ // Hopefully the fix is to change JSONCompilationDatabase and the interface.
if (CDB && !Cached)
OnCommandChanged.broadcast(CDB->getAllFiles());
return CDB;
@@ -112,7 +114,7 @@ OverlayCDB::getCompileCommand(PathRef File, ProjectInfo *Project) const {
return It->second;
}
}
- return Base ? Base->getCompileCommand(File) : None;
+ return Base ? Base->getCompileCommand(File, Project) : None;
}
tooling::CompileCommand OverlayCDB::getFallbackCommand(PathRef File) const {
OpenPOWER on IntegriCloud