From 84f772c15bca5f0ac589be5df67918b5fc141bc8 Mon Sep 17 00:00:00 2001 From: Owen Avery Date: Tue, 3 Sep 2024 16:11:58 -0400 Subject: [PATCH] Add virtual destructor to AbstractExpr gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir.h (class AbstractExpr): Add virtual destructor. Signed-off-by: Owen Avery --- gcc/rust/checks/errors/borrowck/rust-bir.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/rust/checks/errors/borrowck/rust-bir.h b/gcc/rust/checks/errors/borrowck/rust-bir.h index 3e4ea9a5d902..f239465676cf 100644 --- a/gcc/rust/checks/errors/borrowck/rust-bir.h +++ b/gcc/rust/checks/errors/borrowck/rust-bir.h @@ -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