[PATCH] D73610: [clangd] Replace raw lexer code with token buffer in prepare rename.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 29 01:27:00 PST 2020


hokein created this revision.
hokein added a reviewer: sammccall.
Herald added subscribers: usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.

there is a slight behavior change in this patch:

- before: `in^t a;`, returns our internal error message (no symbol at given location)
- after: `in^t a, returns null, and client displays their message (e.g. e.g. "the element can't be renamed" in vscode).

both are sensible according LSP, and we'd save one `rename` call in the later case.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73610

Files:
  clang-tools-extra/clangd/ClangdServer.cpp
  clang-tools-extra/clangd/SourceCode.cpp
  clang-tools-extra/clangd/SourceCode.h
  clang-tools-extra/clangd/refactor/Rename.cpp
  clang-tools-extra/clangd/test/rename.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73610.241066.patch
Type: text/x-patch
Size: 4406 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200129/3b479be8/attachment.bin>


More information about the cfe-commits mailing list