From 2f2f0164ff3a392572bc055234094c502eff79e3 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 8 Sep 2023 21:51:59 -0400 Subject: [PATCH] Internals: Use specific types on some cloneTrees. No functional change. --- src/V3Assert.cpp | 2 +- src/V3Subst.cpp | 4 ++-- src/V3Width.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/V3Assert.cpp b/src/V3Assert.cpp index a731dfee3..59fd8ede5 100644 --- a/src/V3Assert.cpp +++ b/src/V3Assert.cpp @@ -256,7 +256,7 @@ private: ifp = nextifp; } while (ifp); - AstNode* const newifp = nodep->cloneTree(false); + AstIf* const newifp = nodep->cloneTree(false); const bool allow_none = nodep->unique0Pragma(); // Empty case means no property diff --git a/src/V3Subst.cpp b/src/V3Subst.cpp index a83a4cf93..eecb39579 100644 --- a/src/V3Subst.cpp +++ b/src/V3Subst.cpp @@ -123,7 +123,7 @@ public: if (!m_varp->isWide() && !m_whole.m_complex && m_whole.m_assignp && !m_wordAssign) { const AstNodeAssign* const assp = m_whole.m_assignp; UASSERT_OBJ(assp, errp, "Reading whole that was never assigned"); - return (assp->rhsp()); + return assp->rhsp(); } else { return nullptr; } @@ -133,7 +133,7 @@ public: if (!m_whole.m_complex && !m_whole.m_assignp && !m_words[word].m_complex) { const AstNodeAssign* const assp = getWordAssignp(word); UASSERT_OBJ(assp, errp, "Reading a word that was never assigned, or bad word #"); - return (assp->rhsp()); + return assp->rhsp(); } else { return nullptr; } diff --git a/src/V3Width.cpp b/src/V3Width.cpp index f947d720e..ebc770fc3 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -3884,7 +3884,7 @@ private: patp = VN_AS(patp->nextp(), PatMember)) { const int times = visitPatMemberRep(patp); for (int i = 1; i < times; i++) { - AstNode* const newp = patp->cloneTree(false); + AstPatMember* const newp = patp->cloneTree(false); patp->addNextHere(newp); // This loop will see the new elements as part of nextp() }