mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Internals: Improve astgen type enums to be switch statement friendly (#6362)
- Remove _ENUM_END, so -Wswitch does not demand it's covered. Use the new NUM_TYPES constexpr member instead. - Remove 'at' prefix. This seems historical and is not particularly useful. - Fix some cppcheck warts while at it
This commit is contained in:
+2
-2
@@ -177,7 +177,7 @@ class CCtorsVisitor final : public VNVisitor {
|
||||
// If can be referred to by base pointer, need virtual delete
|
||||
funcp->isVirtual(classp->isExtended());
|
||||
funcp->slow(false);
|
||||
insertSc(funcp, classp, VNType::atScDtor);
|
||||
insertSc(funcp, classp, VNType::ScDtor);
|
||||
classp->addStmtsp(funcp);
|
||||
}
|
||||
}
|
||||
@@ -188,7 +188,7 @@ class CCtorsVisitor final : public VNVisitor {
|
||||
m_varResetp = nullptr;
|
||||
m_cfuncp = nodep;
|
||||
iterateChildren(nodep);
|
||||
if (nodep->name() == "new") insertSc(nodep, m_modp, VNType::atScCtor);
|
||||
if (nodep->name() == "new") insertSc(nodep, m_modp, VNType::ScCtor);
|
||||
}
|
||||
void visit(AstVar* nodep) override {
|
||||
if (nodep->needsCReset()) {
|
||||
|
||||
Reference in New Issue
Block a user