[PATCH] D88634: [clangd] Extend the rename API.

2020-10-02 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0f0cbcc4b166: [clangd] Extend the rename API. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D88634: [clangd] Extend the rename API.

2020-10-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 295819. hokein marked an inline comment as done. hokein added a comment. change LocalChanges type to vector Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88634/new/ https://reviews.llvm.org/D88634 Files: clan

[PATCH] D88634: [clangd] Extend the rename API.

2020-10-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. LG, thanks! Comment at: clang-tools-extra/clangd/refactor/Rename.h:62 + // Edits for the current main file. + Edit LocalChanges; + // Complete edits for the rename, including LocalChanges. this cou

[PATCH] D88634: [clangd] Extend the rename API.

2020-10-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.h:61 + Range R; + FileEdits Edits; +}; sammccall wrote: > hokein wrote: > > sammccall wrote: > > > It's slightly awkward to have the half-populated state (may or may not > > > c

[PATCH] D88634: [clangd] Extend the rename API.

2020-10-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 295798. hokein marked 2 inline comments as done. hokein added a comment. address comment: add the LocalChanges field in RenameResult. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88634/new/ https://reviews.llvm

[PATCH] D88634: [clangd] Extend the rename API.

2020-10-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. LG, introducing a separate field for locally affected ranges is up to you. Comment at: clang-tools-extra/clangd/ClangdServer.h:277 + /// + /// It is equal to invoke r

[PATCH] D88634: [clangd] Extend the rename API.

2020-10-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:416 +auto Results = clangd::rename( +{Pos, "dummy", InpAST->AST, File, + RenameOpts.AllowCrossFile ? &EmptyIndex : Index, RenameOpts}); sammccall wrote: > we'r

[PATCH] D88634: [clangd] Extend the rename API.

2020-10-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 295747. hokein marked 6 inline comments as done. hokein added a comment. address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88634/new/ https://reviews.llvm.org/D88634 Files: clang-tools-ex

[PATCH] D88634: [clangd] Extend the rename API.

2020-10-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:408 return CB(InpAST.takeError()); -auto &AST = InpAST->AST; -const auto &SM = AST.getSourceManager(); -auto Loc = sourceLocationInMainFile(SM, Pos); -if (!Loc) - re

[PATCH] D88634: [clangd] Extend the rename API.

2020-10-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: clang. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. several changes: - return a structure result in ren