hokein updated this revision to Diff 214349.
hokein marked an inline comment as done.
hokein added a comment.
Add a comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65936/new/
https://reviews.llvm.org/D65936
Files:
This revision was automatically updated to reflect the committed changes.
Closed by commit rL368429: [clangd] Use raw rename functions to implement the
rename. (authored by hokein, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:182
+CharSourceRange::getCharRange(Rename.getNameRanges()[0]),
NewName)))
+ return
hokein marked 3 inline comments as done.
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.
+
sammccall 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)
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)
hokein updated this revision to Diff 214112.
hokein marked 4 inline comments as done.
hokein added a comment.
Address comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65936/new/
https://reviews.llvm.org/D65936
Files:
sammccall added inline comments.
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:141
+ for (Decl *TopLevelDecl : AST.getLocalTopLevelDecls()) {
+auto RenameInDecl =
+tooling::getOccurrencesOfUSRs(RenameUSRs, OldName, TopLevelDecl);
nit:
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