From b792cf06f139bb1b2d7d1a13f870f797e2837119 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Thu, 13 Aug 2026 17:40:09 +0800 Subject: [MIR] Use the container emptiness query --- backend/unittests/MIR/MIParserTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend/unittests/MIR/MIParserTest.cpp') diff --git a/backend/unittests/MIR/MIParserTest.cpp b/backend/unittests/MIR/MIParserTest.cpp index 60987f4..c35dc74 100644 --- a/backend/unittests/MIR/MIParserTest.cpp +++ b/backend/unittests/MIR/MIParserTest.cpp @@ -470,7 +470,7 @@ void testTypedIntegerTruncation(TestContext &Context) { rcc::mir::MIParser Parser(*Function, *Target, "typed-integer-truncation.mir", Body); const auto Parsed = Parser.parse(); const auto Instructions = Function->allInstructions(); - const auto *MinusOne = Instructions.size() > 0 + const auto *MinusOne = !Instructions.empty() ? Instructions[0]->operandAt(1)->getIf() : nullptr; const auto *NarrowNegative = -- cgit v1.2.3