FailedChanges

Summary

  1. [clangd] Adjust diagnostic range to be inside main file (details)
Commit 189aa5b7a4584677ad628ecc2c369db61d4d2515 by kadircet
[clangd] Adjust diagnostic range to be inside main file
Summary: LSP requires diagnostics to lay inside main file. In clangd we
keep diagnostics in three different cases:
- already in main file
- adjusted to a header included in main file
- has a note covering some range in main file
In the last case, we were not adjusting the diagnostics range to be in
main file, therefore these diagnostics ended up pointing some arbitrary
locations.
This patch fixes that issue by adjusting the range of diagnostics to be
the first note inside main file when converting to LSP.
Reviewers: ilya-biryukov
Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72458
The file was modifiedclang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
The file was modifiedclang-tools-extra/clangd/Diagnostics.cpp