Index: clang-tools-extra/trunk/clangd/ClangdLSPServer.h =================================================================== --- clang-tools-extra/trunk/clangd/ClangdLSPServer.h +++ clang-tools-extra/trunk/clangd/ClangdLSPServer.h @@ -50,7 +50,7 @@ private: // Implement DiagnosticsConsumer. virtual void - onDiagnosticsReady(PathRef File, + onDiagnosticsReady(const Context &Ctx, PathRef File, Tagged> Diagnostics) override; // Implement ProtocolCallbacks. Index: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp =================================================================== --- clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp +++ clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp @@ -325,7 +325,8 @@ } void ClangdLSPServer::onDiagnosticsReady( - PathRef File, Tagged> Diagnostics) { + const Context &Ctx, PathRef File, + Tagged> Diagnostics) { json::ary DiagnosticsJSON; DiagnosticToReplacementMap LocalFixIts; // Temporary storage Index: clang-tools-extra/trunk/clangd/ClangdServer.h =================================================================== --- clang-tools-extra/trunk/clangd/ClangdServer.h +++ clang-tools-extra/trunk/clangd/ClangdServer.h @@ -72,7 +72,7 @@ /// Called by ClangdServer when \p Diagnostics for \p File are ready. virtual void - onDiagnosticsReady(PathRef File, + onDiagnosticsReady(const Context &Ctx, PathRef File, Tagged> Diagnostics) = 0; }; Index: clang-tools-extra/trunk/clangd/ClangdServer.cpp =================================================================== --- clang-tools-extra/trunk/clangd/ClangdServer.cpp +++ clang-tools-extra/trunk/clangd/ClangdServer.cpp @@ -586,7 +586,7 @@ return; LastReportedDiagsVersion = Version; - DiagConsumer.onDiagnosticsReady(FileStr, + DiagConsumer.onDiagnosticsReady(Ctx, FileStr, make_tagged(std::move(*Diags), Tag)); }; Index: clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp =================================================================== --- clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp +++ clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp @@ -49,7 +49,7 @@ class ErrorCheckingDiagConsumer : public DiagnosticsConsumer { public: void - onDiagnosticsReady(PathRef File, + onDiagnosticsReady(const Context &Ctx, PathRef File, Tagged> Diagnostics) override { bool HadError = diagsContainErrors(Diagnostics.Value); @@ -470,7 +470,7 @@ TestDiagConsumer() : Stats(FilesCount, FileStat()) {} void onDiagnosticsReady( - PathRef File, + const Context &Ctx, PathRef File, Tagged> Diagnostics) override { StringRef FileIndexStr = llvm::sys::path::stem(File); ASSERT_TRUE(FileIndexStr.consume_front("Foo")); @@ -758,7 +758,7 @@ : StartSecondReparse(std::move(StartSecondReparse)) {} void onDiagnosticsReady( - PathRef File, + const Context &Ctx, PathRef File, Tagged> Diagnostics) override { std::unique_lock Lock(Mutex, std::try_to_lock_t()); Index: clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp =================================================================== --- clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp +++ clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp @@ -59,8 +59,10 @@ using ::testing::Not; class IgnoreDiagnostics : public DiagnosticsConsumer { - void onDiagnosticsReady( - PathRef File, Tagged> Diagnostics) override {} + void + onDiagnosticsReady(const Context &Ctx, PathRef File, + Tagged> Diagnostics) override { + } }; // GMock helpers for matching completion items.