diff options
author | Arlie Davis <arlied@google.com> | 2018-11-28 13:53:38 -0800 |
---|---|---|
committer | Arlie Davis <arlied@google.com> | 2018-11-29 14:34:01 -0800 |
commit | c4939c4e12ac66aa3ac92470169abca16bb9ce5b (patch) | |
tree | 96a522451a111966e81780cd3aedff6b39485a1c /src/hir/expr.hpp | |
parent | b71e1359a6a79caea35f3cda82d028aa5d2a7e65 (diff) | |
download | mrust-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/hir/expr.hpp')
-rw-r--r-- | src/hir/expr.hpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hir/expr.hpp b/src/hir/expr.hpp index 55a4eaf2..00d22c00 100644 --- a/src/hir/expr.hpp +++ b/src/hir/expr.hpp @@ -815,6 +815,7 @@ struct ExprNode_Closure: class ExprVisitor { public: + virtual ~ExprVisitor() = default; virtual void visit_node_ptr(::std::unique_ptr<ExprNode>& node_ptr); virtual void visit_node(ExprNode& node); #define NV(nt) virtual void visit(nt& n) = 0; |