diff options
Diffstat (limited to 'clang-tools-extra/clangd/ClangdServer.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/ClangdServer.cpp | 10 |
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, |

