[all-commits] [llvm/llvm-project] 2772c3: [clangd] Introduce pullDiags endpoint

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Tue Mar 16 04:57:48 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2772c3a9752289ffec473b62f84855262a22de0b
      https://github.com/llvm/llvm-project/commit/2772c3a9752289ffec473b62f84855262a22de0b
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M clang-tools-extra/clangd/ClangdServer.cpp
    M clang-tools-extra/clangd/ClangdServer.h
    M clang-tools-extra/clangd/ParsedAST.cpp
    M clang-tools-extra/clangd/ParsedAST.h
    M clang-tools-extra/clangd/Preamble.h
    M clang-tools-extra/clangd/tool/Check.cpp
    M clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
    M clang-tools-extra/clangd/unittests/ModulesTests.cpp
    M clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
    M clang-tools-extra/clangd/unittests/PreambleTests.cpp
    M clang-tools-extra/clangd/unittests/SelectionTests.cpp
    M clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
    M clang-tools-extra/clangd/unittests/TestTU.cpp
    M clang-tools-extra/clangd/unittests/TestTU.h
    M clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp

  Log Message:
  -----------
  [clangd] Introduce pullDiags endpoint

Implement initial support for pull-based diagnostics in ClangdServer.
This is planned for LSP 3.17, and initial proposal is in
https://github.com/microsoft/vscode-languageserver-node/blob/d15eb0671e0947d14e3548d13754104ee13aa56d/protocol/src/common/proposed.diagnostic.ts#L111.

We chose to serve the requests only when clangd has a fresh preamble
available. In case of a stale preamble we just drop the request on the
floor.

This patch doesn't plumb this to LSP layer yet, as pullDiags is still a
proposal with only an implementation in vscode.

Differential Revision: https://reviews.llvm.org/D98623




More information about the All-commits mailing list