[clangd] Consume error returned by cleanupAndFormat

When called by ClangdServer::applyTweak.
No idea how to actually trigger this in practice, so no tests.

llvm-svn: 363844
This commit is contained in:
Ilya Biryukov 2019-06-19 17:30:02 +00:00
parent a7acc7e855
commit 482269b9fa
1 changed files with 2 additions and 0 deletions

View File

@ -360,6 +360,8 @@ void ClangdServer::applyTweak(PathRef File, Range Sel, StringRef TweakID,
if (auto Formatted = cleanupAndFormat(InpAST->Inputs.Contents,
*Effect->ApplyEdit, Style))
Effect->ApplyEdit = std::move(*Formatted);
else
elog("Failed to format replacements: {0}", Formatted.takeError());
}
return CB(std::move(*Effect));
};