[clangd] Don't use the optional "severity" when comparing Diagnostic.
Summary: We use Diagnostic as a key to find the corresponding FixIt when we do the "apply-fix", but the "severity" field could be omitted, in some cases, the codeAction request sent from LSP clients (e.g. VScode) doesn't include the `severity` field, which makes clangd fail to find the FixIt. Test the following code in VScode, before the fix, no FixIt shown. ``` void main() {} ^~~~ ``` Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41280 llvm-svn: 321106
Loading
Please register or sign in to comment