mirror of
https://github.com/verilator/verilator.git
synced 2026-09-02 02:38:15 +02:00
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:
committed by
Wilson Snyder
parent
8e26bdd098
commit
fbdf5f2dad
+5
-5
@@ -148,12 +148,12 @@ private:
|
||||
}
|
||||
|
||||
// VISITORS
|
||||
virtual void visit(AstCFunc* nodep) {
|
||||
virtual void visit(AstCFunc* nodep) VL_OVERRIDE {
|
||||
m_cfuncp = nodep;
|
||||
iterateChildren(nodep);
|
||||
m_cfuncp = NULL;
|
||||
}
|
||||
virtual void visit(AstNodeAssign* nodep) {
|
||||
virtual void visit(AstNodeAssign* nodep) VL_OVERRIDE {
|
||||
if (!m_cfuncp) return;
|
||||
|
||||
// Left select WordSel or ArraySel
|
||||
@@ -227,9 +227,9 @@ private:
|
||||
}
|
||||
//--------------------
|
||||
// Default: Just iterate
|
||||
virtual void visit(AstVar* nodep) {} // Speedup
|
||||
virtual void visit(AstNodeMath* nodep) {} // Speedup
|
||||
virtual void visit(AstNode* nodep) {
|
||||
virtual void visit(AstVar* nodep) VL_OVERRIDE {} // Speedup
|
||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {} // Speedup
|
||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user