aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-item.h
diff options
context:
space:
mode:
authorMarc Poulhiès <dkm@kataplop.net>2021-03-10 21:41:53 +0100
committerPhilip Herron <herron.philip@googlemail.com>2021-03-14 18:35:34 +0000
commit173bff7f12c2c19502825a11649ad54f612af04a (patch)
tree09e8eb459878a26068306952cb40110d120a38c5 /gcc/rust/backend/rust-compile-item.h
parentb8549556123da80e60922eaa928cfd284f831303 (diff)
downloadgcc-173bff7f12c2c19502825a11649ad54f612af04a.zip
gcc-173bff7f12c2c19502825a11649ad54f612af04a.tar.gz
gcc-173bff7f12c2c19502825a11649ad54f612af04a.tar.bz2
Fix Woverloaded-virtual warnings.
Fix warnings from -Woverloaded-virtual. Fix #274
Diffstat (limited to 'gcc/rust/backend/rust-compile-item.h')
-rw-r--r--gcc/rust/backend/rust-compile-item.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-compile-item.h b/gcc/rust/backend/rust-compile-item.h
index 384bf94..1d4fcda 100644
--- a/gcc/rust/backend/rust-compile-item.h
+++ b/gcc/rust/backend/rust-compile-item.h
@@ -32,6 +32,8 @@ namespace Compile {
class CompileItem : public HIRCompileBase
{
+ using Rust::Compile::HIRCompileBase::visit;
+
public:
static void compile (HIR::Item *item, Context *ctx, bool compile_fns = true)
{
@@ -39,7 +41,7 @@ public:
item->accept_vis (compiler);
}
- void visit (HIR::StaticItem &var)
+ void visit (HIR::StaticItem &var) override
{
TyTy::BaseType *resolved_type = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (var.get_mappings ().get_hirid (),
@@ -67,7 +69,7 @@ public:
ctx->push_var (static_global);
}
- void visit (HIR::ConstantItem &constant)
+ void visit (HIR::ConstantItem &constant) override
{
TyTy::BaseType *resolved_type = nullptr;
bool ok
@@ -85,7 +87,7 @@ public:
ctx->insert_const_decl (constant.get_mappings ().get_hirid (), const_expr);
}
- void visit (HIR::Function &function)
+ void visit (HIR::Function &function) override
{
if (!compile_fns)
return;
@@ -255,7 +257,7 @@ public:
ctx->push_function (fndecl);
}
- void visit (HIR::InherentImpl &impl_block)
+ void visit (HIR::InherentImpl &impl_block) override
{
TyTy::BaseType *self_lookup = nullptr;
if (!ctx->get_tyctx ()->lookup_type (