Skip to content

Commit dd7803d

Browse files
sakupan102CohenArthur
authored andcommitted
Call base class's accept_vis method
gcc/rust/ChangeLog: * hir/tree/rust-hir-visitor.cc (DefaultHIRVisitor::walk): Call base class's accept_vis method Signed-off-by: Ryutaro Okada <[email protected]>
1 parent ac617d7 commit dd7803d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gcc/rust/hir/tree/rust-hir-visitor.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ DefaultHIRVisitor::walk (IfExpr &expr)
498498
void
499499
DefaultHIRVisitor::walk (IfExprConseqElse &expr)
500500
{
501-
reinterpret_cast<IfExpr &> (expr).accept_vis (*this);
501+
expr.IfExpr::accept_vis (*this);
502502
expr.get_else_block ().accept_vis (*this);
503503
}
504504

@@ -749,23 +749,23 @@ DefaultHIRVisitor::walk (EnumItem &item)
749749
void
750750
DefaultHIRVisitor::walk (EnumItemTuple &item_tuple)
751751
{
752-
reinterpret_cast<EnumItem &> (item_tuple).accept_vis (*this);
752+
item_tuple.EnumItem::accept_vis (*this);
753753
for (auto &field : item_tuple.get_tuple_fields ())
754754
field.get_field_type ().accept_vis (*this);
755755
}
756756

757757
void
758758
DefaultHIRVisitor::walk (EnumItemStruct &item_struct)
759759
{
760-
reinterpret_cast<EnumItem &> (item_struct).accept_vis (*this);
760+
item_struct.EnumItem::accept_vis (*this);
761761
for (auto &field : item_struct.get_struct_fields ())
762762
field.get_field_type ().accept_vis (*this);
763763
}
764764

765765
void
766766
DefaultHIRVisitor::walk (EnumItemDiscriminant &item)
767767
{
768-
reinterpret_cast<EnumItem &> (item).accept_vis (*this);
768+
item.EnumItem::accept_vis (*this);
769769
item.get_discriminant_expression ().accept_vis (*this);
770770
}
771771

0 commit comments

Comments
 (0)