From be58c9605db6eb772dcad678bc61177e6ebfc829 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Fri, 9 Feb 2018 15:11:07 +0000 Subject: [PATCH] [clangd] Fix crash in tests in debug mode. Caused by the lack of checking of an Expected value in the previous commit. llvm-svn: 324736 --- clang-tools-extra/unittests/clangd/ClangdTests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clang-tools-extra/unittests/clangd/ClangdTests.cpp b/clang-tools-extra/unittests/clangd/ClangdTests.cpp index 9d6486d..bd78900 100644 --- a/clang-tools-extra/unittests/clangd/ClangdTests.cpp +++ b/clang-tools-extra/unittests/clangd/ClangdTests.cpp @@ -483,9 +483,9 @@ TEST_F(ClangdVFSTest, InvalidCompileCommand) { .get() .Value.items, IsEmpty()); - EXPECT_THAT( - Server.signatureHelp(FooCpp, Position{0, 0}).get().Value.signatures, - IsEmpty()); + auto SigHelp = Server.signatureHelp(FooCpp, Position{0, 0}); + ASSERT_TRUE(bool(SigHelp)) << "signatureHelp returned an error"; + EXPECT_THAT(SigHelp->Value.signatures, IsEmpty()); } class ClangdThreadingTest : public ClangdVFSTest {}; -- 2.7.4