summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/ClangdServer.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2019-06-19 07:29:10 +0000
committerSam McCall <sam.mccall@gmail.com>2019-06-19 07:29:10 +0000
commit08372eb73bf0a21d8d824084cb15efd0a9ee99bb (patch)
tree1d7e88927bcb7692669485a35035952e87020962 /clang-tools-extra/clangd/ClangdServer.cpp
parent38047dbca4e7c54bd01e6ad18df6971adda0679c (diff)
downloadbcm5719-llvm-08372eb73bf0a21d8d824084cb15efd0a9ee99bb.tar.gz
bcm5719-llvm-08372eb73bf0a21d8d824084cb15efd0a9ee99bb.zip
Revert "[clangd] Return vector<TextEdit> from applyTweak. NFC"
This reverts commit r363691. llvm-svn: 363766
Diffstat (limited to 'clang-tools-extra/clangd/ClangdServer.cpp')
-rw-r--r--clang-tools-extra/clangd/ClangdServer.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp
index fce0cc3720b..1b882048385 100644
--- a/clang-tools-extra/clangd/ClangdServer.cpp
+++ b/clang-tools-extra/clangd/ClangdServer.cpp
@@ -329,7 +329,7 @@ void ClangdServer::enumerateTweaks(PathRef File, Range Sel,
}
void ClangdServer::applyTweak(PathRef File, Range Sel, StringRef TweakID,
- Callback<ResolvedEffect> CB) {
+ Callback<Tweak::Effect> CB) {
auto Action = [Sel](decltype(CB) CB, std::string File, std::string TweakID,
Expected<InputsAndAST> InpAST) {
if (!InpAST)
@@ -352,13 +352,7 @@ void ClangdServer::applyTweak(PathRef File, Range Sel, StringRef TweakID,
*Effect->ApplyEdit, Style))
Effect->ApplyEdit = std::move(*Formatted);
}
-
- ResolvedEffect R;
- R.ShowMessage = std::move(Effect->ShowMessage);
- if (Effect->ApplyEdit)
- R.ApplyEdit =
- replacementsToEdits(InpAST->Inputs.Contents, *Effect->ApplyEdit);
- return CB(std::move(R));
+ return CB(std::move(*Effect));
};
WorkScheduler.runWithAST(
"ApplyTweak", File,
OpenPOWER on IntegriCloud