diff options
Diffstat (limited to 'clang-tools-extra/unittests/clangd/GlobalCompilationDatabaseTests.cpp')
-rw-r--r-- | clang-tools-extra/unittests/clangd/GlobalCompilationDatabaseTests.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang-tools-extra/unittests/clangd/GlobalCompilationDatabaseTests.cpp b/clang-tools-extra/unittests/clangd/GlobalCompilationDatabaseTests.cpp index f502f79b71f..f3916108c63 100644 --- a/clang-tools-extra/unittests/clangd/GlobalCompilationDatabaseTests.cpp +++ b/clang-tools-extra/unittests/clangd/GlobalCompilationDatabaseTests.cpp @@ -41,9 +41,12 @@ class OverlayCDBTest : public ::testing::Test { class BaseCDB : public GlobalCompilationDatabase { public: Optional<tooling::CompileCommand> - getCompileCommand(StringRef File) const override { - if (File == testPath("foo.cc")) + getCompileCommand(StringRef File, ProjectInfo *Project) const override { + if (File == testPath("foo.cc")) { + if (Project) + Project->SourceRoot = testRoot(); return cmd(File, "-DA=1"); + } return None; } |