[PATCH] D148783: [clangd] Add support TextDocumentEdit.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 20 00:16:14 PDT 2023


hokein added inline comments.


================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1722
                [&](clangd::Diagnostic Diag, llvm::ArrayRef<Fix> Fixes) {
+                 if (DiagOpts.EmbedFixesInDiagnostics && !Fixes.empty()) {
+                   Diag.codeActions.emplace();
----------------
This part of code is moved from the `toLSPDiags`, we can keep it unchanged then we have to pass the `Version` and `SupportsDocumentChanges` to `toLSPDiags` which makes the API ugly. Open for ideas.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148783/new/

https://reviews.llvm.org/D148783



More information about the cfe-commits mailing list