[PATCH] D39430: [clangd] various fixes
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 5 04:58:14 PST 2017
ilya-biryukov added a comment.
In https://reviews.llvm.org/D39430#943387, @malaperle wrote:
> I'd rather keep one commit per fix or feature. I would think the clang-format part should be one commit/review on its own. But I'm not very familiar with the practices here so I'll let others comment.
+1, please create a separate review per fix or feature.
================
Comment at: clangd/ClangdServer.h:288
+ /// Get "FixIt" replacements for the given diagnostic.
+ llvm::SmallVector<TextEdit, 1> getFixIts(StringRef File,
+ const clangd::Diagnostic &D);
----------------
There are two ways to return fixits from `ClangdServer` now, one is `DiagnosticsConsumer`, the other is the new `getFixIts` method.
I'd also argue the fact that we can't attach fixits to diagnostics is LSP-specific and therefore it should be handled by `ClangdLSPServer`.
If the problem is that the cache is never cleaned up, we could simply remove the fixits when handling `textDocument/didClose`.
I think we should not put this method into `ClangdServer`.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D39430
More information about the cfe-commits
mailing list