Skip to content

[ConstantFPRange] Suppress unused result warnings. NFC. #109921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions llvm/unittests/IR/ConstantFPRangeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,18 +414,21 @@ TEST_F(ConstantFPRangeTest, Print) {
#ifdef GTEST_HAS_DEATH_TEST
#ifndef NDEBUG
TEST_F(ConstantFPRangeTest, NonCanonicalEmptySet) {
EXPECT_DEATH(ConstantFPRange::getNonNaN(APFloat(1.0), APFloat(0.0)),
EXPECT_DEATH((void)(ConstantFPRange::getNonNaN(APFloat(1.0), APFloat(0.0))),
"Non-canonical form");
}
TEST_F(ConstantFPRangeTest, MismatchedSemantics) {
EXPECT_DEATH(ConstantFPRange::getNonNaN(APFloat(0.0), APFloat(1.0f)),
EXPECT_DEATH((void)(ConstantFPRange::getNonNaN(APFloat(0.0), APFloat(1.0f))),
"Should only use the same semantics");
EXPECT_DEATH(One.contains(APFloat(1.0f)),
EXPECT_DEATH((void)(One.contains(APFloat(1.0f))),
"Should only use the same semantics");
ConstantFPRange OneF32 = ConstantFPRange(APFloat(1.0f));
EXPECT_DEATH(One.contains(OneF32), "Should only use the same semantics");
EXPECT_DEATH(One.intersectWith(OneF32), "Should only use the same semantics");
EXPECT_DEATH(One.unionWith(OneF32), "Should only use the same semantics");
EXPECT_DEATH((void)(One.contains(OneF32)),
"Should only use the same semantics");
EXPECT_DEATH((void)(One.intersectWith(OneF32)),
"Should only use the same semantics");
EXPECT_DEATH((void)(One.unionWith(OneF32)),
"Should only use the same semantics");
}
#endif
#endif
Expand Down
Loading