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

2019-08-09 Thread Haojian Wu via Phabricator via cfe-commits
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:

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

2019-08-09 Thread Haojian Wu via Phabricator via cfe-commits
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:

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

2019-08-09 Thread Sam McCall via Phabricator via cfe-commits
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

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

2019-08-08 Thread Haojian Wu via Phabricator via cfe-commits
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. +

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

2019-08-08 Thread Sam McCall via Phabricator via cfe-commits
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)

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

2019-08-08 Thread Haojian Wu via Phabricator via cfe-commits
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)

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

2019-08-08 Thread Haojian Wu via Phabricator via cfe-commits
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:

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

2019-08-08 Thread Sam McCall via Phabricator via cfe-commits
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:

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

2019-08-08 Thread Haojian Wu via Phabricator via cfe-commits
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