[clangd] findNearbyIdentifier(): fix the word search in the token stream.
Without this patch the word occurrence search always returns the first token of the file. Despite of that, `findNeardyIdentifier()` returns the correct result (but inefficently) until there are several matched tokens with the same value `floor(log2(<token line> - <word line>))` (e.g. several matched tokens on the same line). Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D84912 (cherry picked from commit 05b17346)
Loading
Please register or sign in to comment