[clangd] Revert back to previous heuristic for diagnostic range extraction.
authorKadir Cetinkaya <kadircet@google.com>
Tue, 9 Oct 2018 08:41:12 +0000 (08:41 +0000)
committerKadir Cetinkaya <kadircet@google.com>
Tue, 9 Oct 2018 08:41:12 +0000 (08:41 +0000)
commit84bf607eac44ea32c9cb662c21ccd4c23da7e174
treea20c1fc10579e4d156a80aabc9671e2b94ede757
parent7734e63ad84e5cf8e8686ab8bf310c1193494aef
[clangd] Revert back to previous heuristic for diagnostic range extraction.

Summary: Also add a few new test cases and a special case into handling of empty fixit ranges that  collides with location of a diag.

Reviewers: sammccall, ilya-biryukov

Reviewed By: sammccall

Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits

Differential Revision: https://reviews.llvm.org/D52889

llvm-svn: 344025
clang-tools-extra/clangd/Diagnostics.cpp
clang-tools-extra/unittests/clangd/ClangdUnitTests.cpp