[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 04:44:51 PDT 2019


hokein added inline comments.


================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:175
+    // Currently, we only support normal rename (one range) for C/C++.
+    // FIXME: support multiple-range rename for objective-c methods.
+    if (Rename.getNameRanges().size() > 1)
----------------
sammccall wrote:
> is this a regression in this patch, or did the limitation already exist?
this is not a regression, this is a limitation in clangd.


================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:178
+      continue;
+    cantFail(FilteredChanges.add(tooling::Replacement(
+        AST.getASTContext().getSourceManager(),
----------------
sammccall wrote:
> why can't this fail?
I just kept the previous behavior. Made the error emit to the client rather than crashing here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65936/new/

https://reviews.llvm.org/D65936





More information about the cfe-commits mailing list