diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-07-11 17:45:03 +0200 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-07-12 09:06:54 +0000 |
commit | 2377e5b2da35509e0dde71cb09a29007fac9747c (patch) | |
tree | 63b4bfd944f6177806d224dcb20a6b735d204d99 /gcc | |
parent | 010e701e5f7a4dd6918ffa2fd24135c616f04721 (diff) | |
download | gcc-2377e5b2da35509e0dde71cb09a29007fac9747c.zip gcc-2377e5b2da35509e0dde71cb09a29007fac9747c.tar.gz gcc-2377e5b2da35509e0dde71cb09a29007fac9747c.tar.bz2 |
Add missing virtual destructor to interfaces
Those interfaces missed a virtual destructor. This lead to several
warning.
gcc/rust/ChangeLog:
* ast/rust-ast.h: Add virtual destructor.
* expand/rust-macro-expand.h: Likewise.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-ast.h | 1 | ||||
-rw-r--r-- | gcc/rust/expand/rust-macro-expand.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 9c18d27..6f1961b 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -90,6 +90,7 @@ enum class Kind class Visitable { public: + virtual ~Visitable () = default; virtual void accept_vis (ASTVisitor &vis) = 0; }; diff --git a/gcc/rust/expand/rust-macro-expand.h b/gcc/rust/expand/rust-macro-expand.h index 7948a80..b9b0d78 100644 --- a/gcc/rust/expand/rust-macro-expand.h +++ b/gcc/rust/expand/rust-macro-expand.h @@ -90,6 +90,8 @@ public: Repetition, }; + virtual ~MatchedFragmentContainer () = default; + virtual Kind get_kind () const = 0; virtual std::string as_string () const = 0; |