[clang-tools-extra] 15bf2aa - [clangd][test] Fix error message in SerializationTest.BinaryConversions
Tom Praschan via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 10 23:50:28 PDT 2022
Author: Tom Praschan
Date: 2022-08-11T08:50:23+02:00
New Revision: 15bf2aa44aa1ffa049782316273f84c2db682e50
URL: https://github.com/llvm/llvm-project/commit/15bf2aa44aa1ffa049782316273f84c2db682e50
DIFF: https://github.com/llvm/llvm-project/commit/15bf2aa44aa1ffa049782316273f84c2db682e50.diff
LOG: [clangd][test] Fix error message in SerializationTest.BinaryConversions
I noticed this when adding a new type to the index for
https://github.com/clangd/clangd/issues/529. When the assertion failed,
this actually caused a crash, because llvm::expected would complain that
we did not take the error.
Added:
Modified:
clang-tools-extra/clangd/unittests/SerializationTests.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/unittests/SerializationTests.cpp b/clang-tools-extra/clangd/unittests/SerializationTests.cpp
index e99626ba75d7..ae1914f30331 100644
--- a/clang-tools-extra/clangd/unittests/SerializationTests.cpp
+++ b/clang-tools-extra/clangd/unittests/SerializationTests.cpp
@@ -222,7 +222,7 @@ TEST(SerializationTest, BinaryConversions) {
std::string Serialized = llvm::to_string(Out);
auto In2 = readIndexFile(Serialized);
- ASSERT_TRUE(bool(In2)) << In.takeError();
+ ASSERT_TRUE(bool(In2)) << In2.takeError();
ASSERT_TRUE(In2->Symbols);
ASSERT_TRUE(In2->Refs);
ASSERT_TRUE(In2->Relations);
More information about the cfe-commits
mailing list