Skip to content

Commit

Permalink
abstract class's destructor should be virtualed (#709)
Browse files Browse the repository at this point in the history
Signed-off-by: Junwang Zhao <[email protected]>
  • Loading branch information
zhjwpku authored Oct 21, 2024
1 parent 7cf7d95 commit 665804d
Show file tree
Hide file tree
Showing 25 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class EdgeLike : public AstNode {
public:
explicit EdgeLike(AstNodeType type) : AstNode(type) {}
~EdgeLike() = default;
virtual ~EdgeLike() = default;
};

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class ElementPredicate : public AstNode {
public:
explicit ElementPredicate(AstNodeType type) : AstNode(type) {}
~ElementPredicate() = default;
virtual ~ElementPredicate() = default;
};

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class Hint : public AstNode {
public:
explicit Hint(AstNodeType type) : AstNode(type) {}
~Hint() = default;
virtual ~Hint() = default;
}; // class Hint

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class LabelTree : public AstNode {
public:
explicit LabelTree(AstNodeType type) : AstNode(type) {}
~LabelTree() = default;
virtual ~LabelTree() = default;

friend bool operator==(const LabelTree& lhs, const LabelTree& rhs) {
return lhs.type() == rhs.type() && lhs.equals(rhs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class PathPrefix : public AstNode {
public:
explicit PathPrefix(AstNodeType type) : AstNode(type) {}
~PathPrefix() = default;
virtual ~PathPrefix() = default;
};

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class QueryConjunctionType : public AstNode {
public:
explicit QueryConjunctionType(AstNodeType nodeType) : AstNode(nodeType) {}
~QueryConjunctionType() = default;
virtual ~QueryConjunctionType() = default;
}; // class QueryConjunctionType

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace frontend {
class RemoveItem : public AstNode {
public:
explicit RemoveItem(AstNodeType type) : AstNode(type) {}
~RemoveItem() = default;
virtual ~RemoveItem() = default;
};

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class SchemaRef : public AstNode {
public:
explicit SchemaRef(AstNodeType nodeType) : AstNode(nodeType) {}
~SchemaRef() = default;
virtual ~SchemaRef() = default;
}; // class SchemaRef

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class SessionResetCommand : public AstNode {
public:
explicit SessionResetCommand(AstNodeType type) : AstNode(type) {}
~SessionResetCommand() = default;
virtual ~SessionResetCommand() = default;
};

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class SessionSetCommand : public AstNode {
public:
explicit SessionSetCommand(AstNodeType type) : AstNode(type) {}
~SessionSetCommand() = default;
virtual ~SessionSetCommand() = default;
};

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class SetItem : public AstNode {
public:
explicit SetItem(AstNodeType type) : AstNode(type) {}
~SetItem() = default;
virtual ~SetItem() = default;
};

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class BinaryOp : public Expr {
public:
explicit BinaryOp(AstNodeType type) : Expr(type), left_(nullptr), right_(nullptr) {}
~BinaryOp() = default;
virtual ~BinaryOp() = default;

void setLeft(Expr* left) { left_ = left; }
Expr* left() const { return left_; }
Expand Down
2 changes: 1 addition & 1 deletion deps/geax-front-end/include/geax-front-end/ast/expr/Expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class GQLExpr;
class Expr : public AstNode {
public:
explicit Expr(AstNodeType type) : AstNode(type) {}
~Expr() = default;
virtual ~Expr() = default;

friend bool operator==(const Expr& lhs, const Expr& rhs) {
return lhs.type() == rhs.type() && lhs.equals(rhs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class Literal : public Expr {
public:
explicit Literal(AstNodeType type) : Expr(type) {}
~Literal() = default;
virtual ~Literal() = default;
}; // class Literal

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class UnaryOp : public Expr {
public:
explicit UnaryOp(AstNodeType type) : Expr(type), expr_(nullptr) {}
~UnaryOp() = default;
virtual ~UnaryOp() = default;

void setExpr(Expr* expr) { expr_ = expr; }
Expr* expr() const { return expr_; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class BindingDefinition : public AstNode {
public:
explicit BindingDefinition(AstNodeType nodeType) : AstNode(nodeType) {}
~BindingDefinition() = default;
virtual ~BindingDefinition() = default;
}; // class BindingDefinition

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class BindingTableExpr : public AstNode {
public:
explicit BindingTableExpr(AstNodeType nodeType) : AstNode(nodeType) {}
~BindingTableExpr() = default;
virtual ~BindingTableExpr() = default;
}; // class BindingTableExpr

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class EndTransaction : public Transaction {
public:
explicit EndTransaction(AstNodeType type) : Transaction(type) {}
~EndTransaction() = default;
virtual ~EndTransaction() = default;
};

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class LinearQueryStatement : public AstNode {
public:
explicit LinearQueryStatement(AstNodeType nodeType) : AstNode(nodeType) {}
~LinearQueryStatement() = default;
virtual ~LinearQueryStatement() = default;
}; // class LinearQueryStatement

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class PrimitiveDataModifyStatement : public AstNode {
public:
explicit PrimitiveDataModifyStatement(AstNodeType nodeType) : AstNode(nodeType) {}
~PrimitiveDataModifyStatement() = default;
virtual ~PrimitiveDataModifyStatement() = default;
}; // class PrimitiveDataModifyStatement

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class ProcedureCall : public AstNode {
public:
explicit ProcedureCall(AstNodeType nodeType) : AstNode(nodeType) {}
~ProcedureCall() = default;
virtual ~ProcedureCall() = default;
}; // class ProcedureCall

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class Session : public AstNode {
public:
explicit Session(AstNodeType type) : AstNode(type) {}
~Session() = default;
virtual ~Session() = default;
};

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class SimpleQueryStatement : public AstNode {
public:
explicit SimpleQueryStatement(AstNodeType nodeType) : AstNode(nodeType) {}
~SimpleQueryStatement() = default;
virtual ~SimpleQueryStatement() = default;
}; // class SimpleQueryStatement

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace frontend {
class Statement : public AstNode {
public:
explicit Statement(AstNodeType nodeType) : AstNode(nodeType) {}
~Statement() = default;
virtual ~Statement() = default;
}; // class Statement

} // namespace frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace frontend {
class Transaction : public AstNode {
public:
explicit Transaction(AstNodeType type) : AstNode(type) {}
~Transaction() = default;
virtual ~Transaction() = default;
};

} // namespace frontend
Expand Down

0 comments on commit 665804d

Please sign in to comment.