[PATCH] D75251: [clangd] Move the format rename edits from clangdserver to rename API, NFC.
Kirill Bobyrev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 28 01:04:33 PST 2020
kbobyrev accepted this revision.
kbobyrev added a comment.
This revision is now accepted and ready to land.
LGTM with few nits
================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:466
+llvm::Expected<FileEdits> formatEdits(FileEdits FE,
+ const format::FormatStyle Style) {
----------------
nit: Edits
================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:469
+ llvm::Error Err = llvm::Error::success();
+ for (auto &E : FE)
+ Err = llvm::joinErrors(reformatEdit(E.getValue(), Style), std::move(Err));
----------------
nit: Edit
================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:473
+ return std::move(Err);
+ return FE;
+}
----------------
maybe `return Err ? std::move(Err) : FE;`, but up to you
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75251/new/
https://reviews.llvm.org/D75251
More information about the cfe-commits
mailing list