From d874d2fd065e2d4095888ceea67cb590d0bf45e6 Mon Sep 17 00:00:00 2001 From: github action Date: Wed, 20 May 2026 11:11:52 +0000 Subject: [PATCH] Apply 'make format' --- src/V3FsmDetect.cpp | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/V3FsmDetect.cpp b/src/V3FsmDetect.cpp index 0fab3d94a..64b3231f4 100644 --- a/src/V3FsmDetect.cpp +++ b/src/V3FsmDetect.cpp @@ -608,20 +608,21 @@ class FsmDetectVisitor final : public VNVisitor { const AstVarRef* const selp = VN_CAST(casep->exprp(), VarRef); if (!selp) return false; - return std::any_of(m_registerCandidates.cbegin(), m_registerCandidates.cend(), - [&](const FsmRegisterCandidate& reg) -> bool { - const bool matchesNext = selp->varScopep() == reg.nextVscp(); - const bool matchesState = selp->varScopep() == reg.stateVscp(); + return std::any_of( + m_registerCandidates.cbegin(), m_registerCandidates.cend(), + [&](const FsmRegisterCandidate& reg) -> bool { + const bool matchesNext = selp->varScopep() == reg.nextVscp(); + const bool matchesState = selp->varScopep() == reg.stateVscp(); - if (!matchesNext && !matchesState) return false; - if (matchesNext - && !FsmDetectVisitor::hasCanonicalNextStateDefaultBeforeCase( - stmtsp, casep, reg.stateVscp(), reg.nextVscp())) { - return false; - } - return FsmDetectVisitor::caseSupportedTransitionNode(casep, reg.nextVscp(), - reg.inclCond()); - }); + if (!matchesNext && !matchesState) return false; + if (matchesNext + && !FsmDetectVisitor::hasCanonicalNextStateDefaultBeforeCase( + stmtsp, casep, reg.stateVscp(), reg.nextVscp())) { + return false; + } + return FsmDetectVisitor::caseSupportedTransitionNode(casep, reg.nextVscp(), + reg.inclCond()); + }); } }; @@ -1745,14 +1746,12 @@ class FsmDetectVisitor final : public VNVisitor { FsmRegisterCandidate reg; if (analyzer.matchRegisterCandidate(nodep, reg)) { AstVarScope* const stateVscp = reg.stateVscp(); - const bool found = std::any_of( - m_registerCandidates.cbegin(), m_registerCandidates.cend(), - [stateVscp](const FsmRegisterCandidate& existing) { - return existing.stateVscp() == stateVscp; - }); - if (!found) { - m_registerCandidates.emplace_back(reg); - } + const bool found + = std::any_of(m_registerCandidates.cbegin(), m_registerCandidates.cend(), + [stateVscp](const FsmRegisterCandidate& existing) { + return existing.stateVscp() == stateVscp; + }); + if (!found) { m_registerCandidates.emplace_back(reg); } } if (nodep->keyword() == VAlwaysKwd::ALWAYS_COMB) { m_comboAlwayss.emplace_back(m_scopep, nodep);