Skip to content

Commit

Permalink
Add virtual destructor to AbstractExpr
Browse files Browse the repository at this point in the history
gcc/rust/ChangeLog:

	* checks/errors/borrowck/rust-bir.h
	(class AbstractExpr): Add virtual destructor.

Signed-off-by: Owen Avery <[email protected]>
  • Loading branch information
powerboat9 authored and P-E-P committed Sep 6, 2024
1 parent 12af831 commit 84f772c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gcc/rust/checks/errors/borrowck/rust-bir.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ class AbstractExpr : public Visitable
public:
explicit AbstractExpr (ExprKind kind) : kind (kind) {}
WARN_UNUSED_RESULT ExprKind get_kind () const { return kind; }

virtual ~AbstractExpr () {}
};

class InitializerExpr : public VisitableImpl<AbstractExpr, InitializerExpr>
Expand Down

0 comments on commit 84f772c

Please sign in to comment.