[clang-tools-extra] r363844 - [clangd] Consume error returned by cleanupAndFormat
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 19 10:30:02 PDT 2019
Author: ibiryukov
Date: Wed Jun 19 10:30:02 2019
New Revision: 363844
URL: http://llvm.org/viewvc/llvm-project?rev=363844&view=rev
Log:
[clangd] Consume error returned by cleanupAndFormat
When called by ClangdServer::applyTweak.
No idea how to actually trigger this in practice, so no tests.
Modified:
clang-tools-extra/trunk/clangd/ClangdServer.cpp
Modified: clang-tools-extra/trunk/clangd/ClangdServer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdServer.cpp?rev=363844&r1=363843&r2=363844&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdServer.cpp (original)
+++ clang-tools-extra/trunk/clangd/ClangdServer.cpp Wed Jun 19 10:30:02 2019
@@ -360,6 +360,8 @@ void ClangdServer::applyTweak(PathRef Fi
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));
};
More information about the cfe-commits
mailing list