[PATCH] D98518: [RGT] RPCUtilsTest, replace un-executed EXPECT with unreachable
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 12 08:49:48 PST 2021
probinson created this revision.
probinson added a reviewer: lhames.
probinson requested review of this revision.
Herald added a project: LLVM.
Unreachable code should be self-documented as unreachable.
Found by the Rotten Green Tests project.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D98518
Files:
llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp
Index: llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp
===================================================================
--- llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp
+++ llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp
@@ -871,8 +871,7 @@
Server.addHandler<DummyRPCAPI::VoidBool>(
[](bool B) {
- EXPECT_EQ(B, true)
- << "Server void(bool) received unexpected result";
+ llvm_unreachable("Server void(bool) received unexpected result");
});
Server.removeHandler<DummyRPCAPI::VoidBool>();
@@ -884,8 +883,7 @@
Server.addHandler<DummyRPCAPI::VoidBool>(
[](bool B) {
- EXPECT_EQ(B, true)
- << "Server void(bool) received unexpected result";
+ llvm_unreachable("Server void(bool) received unexpected result");
});
Server.clearHandlers();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98518.330257.patch
Type: text/x-patch
Size: 826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210312/67601b51/attachment.bin>
More information about the llvm-commits
mailing list