Delete copy and move operations for ASTVisitor and ASTConstVisitor

This commit is contained in:
Jason Cobb 2020-04-03 23:47:10 -04:00
parent 4816484964
commit 205063f86b
No known key found for this signature in database
GPG Key ID: 2A3F6A6DCA1E8DED

View File

@ -41,7 +41,16 @@ namespace solidity::frontend
class ASTVisitor
{
public:
ASTVisitor() = default;
ASTVisitor(ASTVisitor const&) = delete;
ASTVisitor(ASTVisitor&&) = delete;
ASTVisitor& operator=(ASTVisitor const&) = delete;
ASTVisitor& operator=(ASTVisitor&&) = delete;
virtual ~ASTVisitor() = default;
virtual bool visit(SourceUnit& _node) { return visitNode(_node); }
virtual bool visit(PragmaDirective& _node) { return visitNode(_node); }
virtual bool visit(ImportDirective& _node) { return visitNode(_node); }
@ -158,7 +167,16 @@ protected:
class ASTConstVisitor
{
public:
ASTConstVisitor() = default;
ASTConstVisitor(ASTConstVisitor const&) = delete;
ASTConstVisitor(ASTConstVisitor&&) = delete;
ASTConstVisitor& operator=(ASTConstVisitor const&) = delete;
ASTConstVisitor& operator=(ASTConstVisitor&&) = delete;
virtual ~ASTConstVisitor() = default;
virtual bool visit(SourceUnit const& _node) { return visitNode(_node); }
virtual bool visit(PragmaDirective const& _node) { return visitNode(_node); }
virtual bool visit(ImportDirective const& _node) { return visitNode(_node); }