summaryrefslogtreecommitdiff
path: root/src/ast/expr.hpp
diff options
context:
space:
mode:
authorArlie Davis <arlied@google.com>2018-11-28 13:53:38 -0800
committerArlie Davis <arlied@google.com>2018-11-29 14:34:01 -0800
commitc4939c4e12ac66aa3ac92470169abca16bb9ce5b (patch)
tree96a522451a111966e81780cd3aedff6b39485a1c /src/ast/expr.hpp
parentb71e1359a6a79caea35f3cda82d028aa5d2a7e65 (diff)
downloadmrust-c4939c4e12ac66aa3ac92470169abca16bb9ce5b.tar.gz
Mark destructors in base classes as virtual.
This is required for correctness, and when using -fsized-deallocation the previous code fails.
Diffstat (limited to 'src/ast/expr.hpp')
-rw-r--r--src/ast/expr.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ast/expr.hpp b/src/ast/expr.hpp
index f3981db5..264b37e9 100644
--- a/src/ast/expr.hpp
+++ b/src/ast/expr.hpp
@@ -623,6 +623,7 @@ struct ExprNode_UniOp:
class NodeVisitor
{
public:
+ virtual ~NodeVisitor() = default;
inline void visit(const unique_ptr<ExprNode>& cnode) {
if(cnode.get())
cnode->visit(*this);