Improve diagnostics range reporting.
authorKadir Cetinkaya <kadircet@google.com>
Thu, 27 Sep 2018 12:12:42 +0000 (12:12 +0000)
committerKadir Cetinkaya <kadircet@google.com>
Thu, 27 Sep 2018 12:12:42 +0000 (12:12 +0000)
commit2e3f1f13b5e674e63846372770b340e8bdfaae2a
tree32cf6fb713177c551ea6bc558856f38ba654a9a3
parentfb5a5d09fe70924c5a55d6fd05b8ef4c90dd88b7
Improve diagnostics range reporting.

Summary:
If we have some range information coming from clang diagnostic, promote
that one even if it doesn't contain diagnostic location inside.

Reviewers: sammccall, ioeric

Reviewed By: ioeric

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

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

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