[PATCH] D150548: [clangd] Deduplicate diagnostic codeaction fixes when the codeaction fixes multiple diagnostics
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 17 09:14:16 PDT 2023
kadircet accepted this revision.
kadircet added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1012-1013
+
+
void ClangdLSPServer::onCodeAction(const CodeActionParams &Params,
----------------
can you revert these
================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1029-1033
+ // A case-specific comparator used to deduplicate diagnostic fixes.
+ // The lessthan is mainly based on fix edit.
+ // A fixit might fix multiple diagnostics (e.g. "remove all unused includes"
+ // fix all unused-includes diagnostics), we don't want to show this
+ // "remove all" fix multiple times in the UI.
----------------
i think it might be better to start with why;
```
Some code actions might fix multiple diagnostics and might be indistinguishable in the UI (e.g. they have the same title).
So we group them here.
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150548/new/
https://reviews.llvm.org/D150548
More information about the cfe-commits
mailing list