Internals: Mark all visit() with VL_OVERRIDE. Closes #2132.

* Add VL_OVERRIDE macro so that compiler can tell my typo when trying to override a function.

* Mark visit() with VL_OVERRIDE. No functional change intended.
This commit is contained in:
Yutetsu TAKATSUKASA
2020-01-21 17:35:56 -05:00
committed by Wilson Snyder
parent 8e26bdd098
commit fbdf5f2dad
71 changed files with 1359 additions and 1357 deletions
+8 -8
View File
@@ -227,7 +227,7 @@ private:
}
// VISITORS
virtual void visit(AstNodeModule* nodep) {
virtual void visit(AstNodeModule* nodep) VL_OVERRIDE {
AstNodeModule* origModp = m_modp;
{
m_modp = nodep;
@@ -238,17 +238,17 @@ private:
}
m_modp = origModp;
}
virtual void visit(AstScope* nodep) {
virtual void visit(AstScope* nodep) VL_OVERRIDE {
m_scopep = nodep;
iterateChildren(nodep);
m_scopep = NULL;
}
virtual void visit(AstVarScope* nodep) {
virtual void visit(AstVarScope* nodep) VL_OVERRIDE {
// Delete the varscope when we're finished
nodep->unlinkFrBack();
pushDeletep(nodep);
}
virtual void visit(AstNodeVarRef* nodep) {
virtual void visit(AstNodeVarRef* nodep) VL_OVERRIDE {
iterateChildren(nodep);
// Convert the hierch name
UASSERT_OBJ(m_scopep, nodep, "Node not under scope");
@@ -258,7 +258,7 @@ private:
nodep->hierThis(hierThis);
nodep->varScopep(NULL);
}
virtual void visit(AstCCall* nodep) {
virtual void visit(AstCCall* nodep) VL_OVERRIDE {
// UINFO(9," "<<nodep<<endl);
iterateChildren(nodep);
// Convert the hierch name
@@ -269,7 +269,7 @@ private:
// Can't do this, as we may have more calls later
// nodep->funcp()->scopep(NULL);
}
virtual void visit(AstCFunc* nodep) {
virtual void visit(AstCFunc* nodep) VL_OVERRIDE {
if (!nodep->user1()) {
m_needThis = false;
m_allowThis = nodep->isStatic().falseU(); // Non-static or unknown if static
@@ -290,8 +290,8 @@ private:
}
}
}
virtual void visit(AstVar*) {}
virtual void visit(AstNode* nodep) { iterateChildren(nodep); }
virtual void visit(AstVar*) VL_OVERRIDE {}
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
public:
// CONSTRUCTORS