[PATCH] D65936: [clangd] Use raw rename functions to implement the rename.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 8 03:53:54 PDT 2019


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

The API provided by refactoring lib doesn't provide enough flexibility
to get clangd's rename to behave as we expect. Instead, we replace it
with the low-level rename functions, which give us more control.

Bonus:

- performance, previously we visit the TU to find all occurrences, now we just visit top-level decls from main file;
- fix a bug where we wrongly filter out the main file replacement due to the different relative/absolute file path;


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65936

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65936.214101.patch
Type: text/x-patch
Size: 7255 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190808/76fe89c4/attachment.bin>


More information about the cfe-commits mailing list