diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2018-11-22 16:20:12 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2018-11-22 16:20:12 +0000 |
commit | 27b83d230d182d2fab0e132f7f75f203cf71d95a (patch) | |
tree | 50702ee0f6b11514dda4c6c9463963cb5d4f943f /clang-tools-extra/clangd/ClangdServer.cpp | |
parent | 893413318fae40a9b6e99b8ece439383906b29aa (diff) | |
download | bcm5719-llvm-27b83d230d182d2fab0e132f7f75f203cf71d95a.tar.gz bcm5719-llvm-27b83d230d182d2fab0e132f7f75f203cf71d95a.zip |
[clangd] Cleanup error consumption code. NFC
- Remove reimplementations of llvm::consumeError.
- Simplify test code by using EXPECT_ERROR where it fits.
llvm-svn: 347472
Diffstat (limited to 'clang-tools-extra/clangd/ClangdServer.cpp')
-rw-r--r-- | clang-tools-extra/clangd/ClangdServer.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp index 03ebcc60a27..27c9089e2f3 100644 --- a/clang-tools-extra/clangd/ClangdServer.cpp +++ b/clang-tools-extra/clangd/ClangdServer.cpp @@ -39,10 +39,6 @@ namespace clang { namespace clangd { namespace { -void ignoreError(Error Err) { - handleAllErrors(std::move(Err), [](const ErrorInfoBase &) {}); -} - std::string getStandardResourceDir() { static int Dummy; // Just an address in this process. return CompilerInvocation::GetResourcesPath("clangd", (void *)&Dummy); @@ -312,7 +308,7 @@ void ClangdServer::dumpAST(PathRef File, unique_function<void(std::string)> Callback) { auto Action = [](decltype(Callback) Callback, Expected<InputsAndAST> InpAST) { if (!InpAST) { - ignoreError(InpAST.takeError()); + llvm::consumeError(InpAST.takeError()); return Callback("<no-ast>"); } std::string Result; |