[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 15 04:46:25 PST 2017
sammccall added a comment.
Can you give some more details about the problem (maybe offline)?
In my testing, I do see a FixIt in VSCode. It fails to apply, for reasons I don't yet understand.
================
Comment at: clangd/Protocol.h:326
- friend bool operator==(const Diagnostic &LHS, const Diagnostic &RHS) {
- return std::tie(LHS.range, LHS.severity, LHS.message) ==
----------------
why removing ==? Even if unused, I'd lean towards keeping it for consistency with <
================
Comment at: clangd/Protocol.h:327
friend bool operator<(const Diagnostic &LHS, const Diagnostic &RHS) {
- return std::tie(LHS.range, LHS.severity, LHS.message) <
- std::tie(RHS.range, RHS.severity, RHS.message);
+ return std::tie(LHS.range, LHS.message) < std::tie(RHS.range, RHS.message);
}
----------------
This definitely needs:
- us to work out for sure whose bug it is (clangd, vscode, or LSP), and file the bug
- a comment referencing the bug
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D41280
More information about the cfe-commits
mailing list