mirror of
https://github.com/verilator/verilator.git
synced 2025-01-31 18:54:03 +00:00
Internals: Relax requirements for AstClass
iteration methods (#5335)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
This commit is contained in:
parent
ec0815e9ac
commit
b100615726
@ -2503,7 +2503,7 @@ protected:
|
|||||||
static void dumpJsonStr(std::ostream& os, const std::string& name, const std::string& val);
|
static void dumpJsonStr(std::ostream& os, const std::string& name, const std::string& val);
|
||||||
static void dumpJsonPtr(std::ostream& os, const std::string& name, const AstNode* const valp);
|
static void dumpJsonPtr(std::ostream& os, const std::string& name, const AstNode* const valp);
|
||||||
|
|
||||||
private:
|
protected:
|
||||||
void iterateListBackwardsConst(VNVisitorConst& v);
|
void iterateListBackwardsConst(VNVisitorConst& v);
|
||||||
|
|
||||||
// For internal use only.
|
// For internal use only.
|
||||||
|
@ -2353,9 +2353,7 @@ public:
|
|||||||
extendsp->classp()->foreachMember(f);
|
extendsp->classp()->foreachMember(f);
|
||||||
}
|
}
|
||||||
for (AstNode* stmtp = stmtsp(); stmtp; stmtp = stmtp->nextp()) {
|
for (AstNode* stmtp = stmtsp(); stmtp; stmtp = stmtp->nextp()) {
|
||||||
if (T_Node* memberp = AstNode::privateCast<T_Node, decltype(stmtp)>(stmtp)) {
|
if (AstNode::privateTypeTest<T_Node>(stmtp)) f(this, static_cast<T_Node*>(stmtp));
|
||||||
f(this, memberp);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Same as above, but stops after first match
|
// Same as above, but stops after first match
|
||||||
@ -2370,8 +2368,8 @@ public:
|
|||||||
if (extendsp->classp()->existsMember(p)) return true;
|
if (extendsp->classp()->existsMember(p)) return true;
|
||||||
}
|
}
|
||||||
for (AstNode* stmtp = stmtsp(); stmtp; stmtp = stmtp->nextp()) {
|
for (AstNode* stmtp = stmtsp(); stmtp; stmtp = stmtp->nextp()) {
|
||||||
if (T_Node* memberp = AstNode::privateCast<T_Node, decltype(stmtp)>(stmtp)) {
|
if (AstNode::privateTypeTest<T_Node>(stmtp)) {
|
||||||
if (p(this, memberp)) return true;
|
if (p(this, static_cast<T_Node*>(stmtp))) return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user