From e9274be24767238328583d98ac1b02e2381707aa Mon Sep 17 00:00:00 2001 From: github action Date: Sat, 6 Jun 2026 00:44:02 +0000 Subject: [PATCH] Apply 'make format' --- src/V3Force.cpp | 7 ++----- test_regress/t/t_forceable_unpacked.cpp | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/V3Force.cpp b/src/V3Force.cpp index 8298ba6e6..75f3cf256 100644 --- a/src/V3Force.cpp +++ b/src/V3Force.cpp @@ -251,7 +251,6 @@ public: return varRefp; } - static AstNodeExpr* buildNestedArraySel(FileLine* flp, AstNodeExpr* fromp, const std::vector& indicies) { AstNodeExpr* curp = fromp; @@ -407,8 +406,7 @@ public: AstNodeStmt* createForceRdUpdateStmtUnpacked(const VarForceInfo& varInfo) const { FileLine* const flp = varInfo.m_varVscp->fileline(); AstVar* const varp = varInfo.m_varVscp->varp(); - AstUnpackArrayDType* const arrDtypep - = VN_AS(varp->dtypep()->skipRefp(), UnpackArrayDType); + AstUnpackArrayDType* const arrDtypep = VN_AS(varp->dtypep()->skipRefp(), UnpackArrayDType); const std::vector dims = arrDtypep->unpackDimensions(); return foreachUnpackedLeaf( dims, [&](const std::vector& idx, int /*flat*/) -> AstNodeStmt* { @@ -633,8 +631,7 @@ public: AstNodeStmt* initStmtp = nullptr; if (AstUnpackArrayDType* const arrDtypep = VN_CAST(varp->dtypeSkipRefp(), UnpackArrayDType)) { - const std::vector dims - = arrDtypep->unpackDimensions(); + const std::vector dims = arrDtypep->unpackDimensions(); const int innerWidth = dims.back()->subDTypep()->skipRefp()->width(); initStmtp = foreachUnpackedLeaf( dims, [&](const std::vector& idx, int /*flat*/) -> AstNodeStmt* { diff --git a/test_regress/t/t_forceable_unpacked.cpp b/test_regress/t/t_forceable_unpacked.cpp index d5cfd9d0b..b6386b643 100644 --- a/test_regress/t/t_forceable_unpacked.cpp +++ b/test_regress/t/t_forceable_unpacked.cpp @@ -26,20 +26,26 @@ int main(int argc, char** argv) { bool changed = true; switch (topp->cyc) { case 1: - en[0][1] = 0x3; val[0][1] = 0x3; - en_a[0][1] = 0x3; val_a[0][1] = 0x2; + en[0][1] = 0x3; + val[0][1] = 0x3; + en_a[0][1] = 0x3; + val_a[0][1] = 0x2; break; case 2: - en[1][0] = 0x3; val[1][0] = 0x2; - en_a[1][0] = 0x3; val_a[1][0] = 0x3; + en[1][0] = 0x3; + val[1][0] = 0x2; + en_a[1][0] = 0x3; + val_a[1][0] = 0x3; break; case 3: - en[0][1] = 0x0; en_a[0][1] = 0x0; + en[0][1] = 0x0; + en_a[0][1] = 0x0; break; case 4: - en[1][0] = 0x0; en_a[1][0] = 0x0; + en[1][0] = 0x0; + en_a[1][0] = 0x0; break; - + default: changed = false; } if (changed) topp->eval();