From 482269b9fa9dd7cb18a01c42b4ea35a403d25536 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Wed, 19 Jun 2019 17:30:02 +0000 Subject: [PATCH] [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 --- clang-tools-extra/clangd/ClangdServer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp index 54c20b57672f..44b485b376b2 100644 --- a/clang-tools-extra/clangd/ClangdServer.cpp +++ b/clang-tools-extra/clangd/ClangdServer.cpp @@ -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)); };