[PATCH] D71345: [clangd] Fall back to selecting token-before-cursor if token-after-cursor fails.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 13 07:38:43 PST 2019
kadircet added a comment.
In D71345#1783579 <https://reviews.llvm.org/D71345#1783579>, @nridge wrote:
> (For completeness, there is a way to target `b` in `a+b+c`: by selecting `b` (such that your selection range has length 1 rather than 0). Then, neither `+` node will enclose the selection range, but the `b` node will.)
yes but this doesn't work with most of the LSP features, e.g. go-to-def, hover, etc.
================
Comment at: clang-tools-extra/clangd/ClangdServer.cpp:443
+ break;
+ } else {
+ Effect = T.takeError();
----------------
nit: no need for else
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71345/new/
https://reviews.llvm.org/D71345
More information about the cfe-commits
mailing list