[clangd] Support multiple cursors in selectionRange.
authorSam McCall <sam.mccall@gmail.com>
Tue, 24 Mar 2020 23:51:50 +0000 (00:51 +0100)
committerSam McCall <sam.mccall@gmail.com>
Wed, 25 Mar 2020 16:59:09 +0000 (17:59 +0100)
commit8f237f9b09aa10fcb684a2ceddc3128e1cafadc7
tree7d22ec0d3b357129a7f87ffc4b059576fb882fec
parenteaa7d00f366ba53e9cf4391163b93253065c2e6c
[clangd] Support multiple cursors in selectionRange.

Summary:
One change: because there's no way to signal failure individually for
each cursor, we now "succeed" with an empty range with no parent if a
cursor doesn't point at anything.

Reviewers: usaxena95

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76741
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/ClangdServer.cpp
clang-tools-extra/clangd/ClangdServer.h
clang-tools-extra/clangd/SemanticSelection.cpp
clang-tools-extra/clangd/SemanticSelection.h
clang-tools-extra/clangd/unittests/SemanticSelectionTests.cpp
clang-tools-extra/clangd/unittests/SyncAPI.cpp
clang-tools-extra/clangd/unittests/SyncAPI.h
llvm/include/llvm/Testing/Support/Annotations.h