diff options
Diffstat (limited to 'clang-tools-extra/clangd/ClangdServer.cpp')
-rw-r--r-- | clang-tools-extra/clangd/ClangdServer.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp index 5f70264a186..460883b8439 100644 --- a/clang-tools-extra/clangd/ClangdServer.cpp +++ b/clang-tools-extra/clangd/ClangdServer.cpp @@ -73,19 +73,10 @@ struct UpdateIndexCallbacks : public ParsingCallbacks { if (SemanticHighlighting) Highlightings = getSemanticHighlightings(AST); - // FIXME: We need a better way to send the maximum line number to the - // differ. - // The differ needs the information about the max number of lines - // to not send diffs that are outside the file. - const SourceManager &SM = AST.getSourceManager(); - FileID MainFileID = SM.getMainFileID(); - int NumLines = SM.getBufferData(MainFileID).count('\n') + 1; - Publish([&]() { DiagConsumer.onDiagnosticsReady(Path, std::move(Diagnostics)); if (SemanticHighlighting) - DiagConsumer.onHighlightingsReady(Path, std::move(Highlightings), - NumLines); + DiagConsumer.onHighlightingsReady(Path, std::move(Highlightings)); }); } |