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
+5 -5
View File
@@ -367,7 +367,7 @@ private:
return true;
}
virtual void visit(AstWhile* nodep) {
virtual void visit(AstWhile* nodep) VL_OVERRIDE {
iterateChildren(nodep);
if (m_varModeCheck || m_varModeReplace) {
} else {
@@ -396,7 +396,7 @@ private:
}
}
}
virtual void visit(AstGenFor* nodep) {
virtual void visit(AstGenFor* nodep) VL_OVERRIDE {
if (!m_generate || m_varModeReplace) {
iterateChildren(nodep);
} // else V3Param will recursively call each for loop to be unrolled for us
@@ -424,7 +424,7 @@ private:
}
}
}
virtual void visit(AstNodeFor* nodep) {
virtual void visit(AstNodeFor* nodep) VL_OVERRIDE {
if (m_generate) { // Ignore for's when expanding genfor's
iterateChildren(nodep);
} else {
@@ -432,7 +432,7 @@ private:
}
}
virtual void visit(AstVarRef* nodep) {
virtual void visit(AstVarRef* nodep) VL_OVERRIDE {
if (m_varModeCheck
&& nodep->varp() == m_forVarp
&& nodep->varScopep() == m_forVscp
@@ -453,7 +453,7 @@ private:
//--------------------
// Default: Just iterate
virtual void visit(AstNode* nodep) {
virtual void visit(AstNode* nodep) VL_OVERRIDE {
if (m_varModeCheck && nodep == m_ignoreIncp) {
// Ignore subtree that is the increment
} else {