aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-13 17:40:09 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-13 17:40:09 +0800
commitb792cf06f139bb1b2d7d1a13f870f797e2837119 (patch)
tree72cd037ab75629259c294a9598207bf662d63aa5 /backend
parent7dc3530fe220dc3a1eb27c25bc10e5597b213fef (diff)
downloadrcc-project-b792cf06f139bb1b2d7d1a13f870f797e2837119.tar.gz
rcc-project-b792cf06f139bb1b2d7d1a13f870f797e2837119.tar.xz
[MIR] Use the container emptiness query
Diffstat (limited to 'backend')
-rw-r--r--backend/unittests/MIR/MIParserTest.cpp2
1 files changed, 1 insertions, 1 deletions
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<rcc::IntegerImmediateOperand>()
: nullptr;
const auto *NarrowNegative =