diff options
Diffstat (limited to 'libjulia')
-rw-r--r-- | libjulia/optimiser/ASTCopier.h | 3 | ||||
-rw-r--r-- | libjulia/optimiser/ASTWalker.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/libjulia/optimiser/ASTCopier.h b/libjulia/optimiser/ASTCopier.h index 36a1ced5..8681f2e0 100644 --- a/libjulia/optimiser/ASTCopier.h +++ b/libjulia/optimiser/ASTCopier.h @@ -37,6 +37,7 @@ namespace julia class ExpressionCopier: public boost::static_visitor<Expression> { public: + virtual ~ExpressionCopier() = default; virtual Expression operator()(Literal const& _literal) = 0; virtual Expression operator()(Identifier const& _identifier) = 0; virtual Expression operator()(FunctionalInstruction const& _instr) = 0; @@ -46,6 +47,7 @@ public: class StatementCopier: public boost::static_visitor<Statement> { public: + virtual ~StatementCopier() = default; virtual Statement operator()(ExpressionStatement const& _statement) = 0; virtual Statement operator()(Instruction const& _instruction) = 0; virtual Statement operator()(Label const& _label) = 0; @@ -66,6 +68,7 @@ public: class ASTCopier: public ExpressionCopier, public StatementCopier { public: + virtual ~ASTCopier() = default; virtual Expression operator()(Literal const& _literal) override; virtual Statement operator()(Instruction const& _instruction) override; virtual Expression operator()(Identifier const& _identifier) override; diff --git a/libjulia/optimiser/ASTWalker.h b/libjulia/optimiser/ASTWalker.h index 97891381..f09c2ff1 100644 --- a/libjulia/optimiser/ASTWalker.h +++ b/libjulia/optimiser/ASTWalker.h @@ -42,6 +42,7 @@ namespace julia class ASTWalker: public boost::static_visitor<> { public: + virtual ~ASTWalker() = default; virtual void operator()(Literal const&) {} virtual void operator()(Instruction const&) { solAssert(false, ""); } virtual void operator()(Identifier const&) {} @@ -82,6 +83,7 @@ protected: class ASTModifier: public boost::static_visitor<> { public: + virtual ~ASTModifier() = default; virtual void operator()(Literal&) {} virtual void operator()(Instruction&) { solAssert(false, ""); } virtual void operator()(Identifier&) {} |