[PATCH] D50571: [clangd] add an extension field to LSP to transfer the diagnostic's category
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 13 01:43:41 PDT 2018
ilya-biryukov added inline comments.
================
Comment at: clangd/Diagnostics.h:40
DiagnosticsEngine::Level Severity = DiagnosticsEngine::Note;
+ unsigned Category;
// Since File is only descriptive, we store a separate flag to distinguish
----------------
Maybe store the string name of the category directly here? This struct was never optimized for efficiency, but aims to be independent of clang, so that the clients might interpret it without calling any clang-specific code (we do reuse the `Level` enum, though, but that's merely for code reuse)
================
Comment at: clangd/Protocol.h:549
+ /// The diagnostic's category. Can be omitted.
+ /// An LSP extension that's used to send the name of the category over to the
+ /// client.
----------------
Maybe add a brief example of category names here, i.e. "semantic issue", etc.?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50571
More information about the cfe-commits
mailing list