Skip to content

Deduplicate some functions within PointerVisitor#4489

Open
P-E-P wants to merge 1 commit intoRust-GCC:masterfrom
P-E-P:pointer_visitor_dup
Open

Deduplicate some functions within PointerVisitor#4489
P-E-P wants to merge 1 commit intoRust-GCC:masterfrom
P-E-P:pointer_visitor_dup

Conversation

@P-E-P
Copy link
Member

@P-E-P P-E-P commented Mar 13, 2026

Some functions within the PointerVisitor were obvious duplicate from the inherited DefaultASTVisitor.

Some functions within the PointerVisitor were obvious duplicate from the
inherited DefaultASTVisitor.

gcc/rust/ChangeLog:

	* ast/rust-ast-pointer-visitor.cc (PointerVisitor::visit): Remove
	duplicated functions.
	* ast/rust-ast-pointer-visitor.h: Remove duplicated function
	prototypes.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
@P-E-P P-E-P requested a review from CohenArthur March 13, 2026 14:59
void
PointerVisitor::visit (AST::AttrInputMacro &attr_input)
{
visit (attr_input.get_macro ());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we should remove this -- seems like we'll eventually want AttrInputMacro to be an ~AttrInputExpr

void
PointerVisitor::visit (AST::MetaItemLitExpr &meta_item)
{
visit (meta_item.get_literal ());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

PointerVisitor::visit (AST::StructPatternElements &spe)
{
for (auto &field : spe.get_struct_pattern_fields ())
visit (field);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably be reseat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants