Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ast refactor #2721

Merged
merged 2 commits into from
Nov 6, 2023
Merged

Ast refactor #2721

merged 2 commits into from
Nov 6, 2023

Conversation

P-E-P
Copy link
Member

@P-E-P P-E-P commented Nov 2, 2023

Refactoring some part of the AST.

  • Fix warning
  • Move implementation outside of header
  • AssociatedItem should inherit from VisItem Won't do

P-E-P added 2 commits November 2, 2023 18:13
Some function lacked the override specifier, this made the compiler emit
several warning.

gcc/rust/ChangeLog:

	* ast/rust-ast.h: Add override specifier.
	* ast/rust-item.h: Likewise.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
Those functions implementation put additional constraints on the headers
which makes the codebase harder to work with.

gcc/rust/ChangeLog:

	* ast/rust-ast.h: Move implementation from here...
	* ast/rust-ast.cc (SingleASTNode::SingleASTNode): ...to here.
	(SingleASTNode::operator=): ...and here...
	(SingleASTNode::accept_vis): ...and here...
	(SingleASTNode::is_error): ...and here...
	(SingleASTNode::as_string): ...also here.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
@P-E-P P-E-P added this to the GCC 14.1 release milestone Nov 2, 2023
@P-E-P P-E-P self-assigned this Nov 2, 2023
@P-E-P P-E-P requested a review from CohenArthur November 6, 2023 10:49
@P-E-P P-E-P marked this pull request as ready for review November 6, 2023 10:50
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

nice cleanup, thank you!

@P-E-P P-E-P added this pull request to the merge queue Nov 6, 2023
Merged via the queue into Rust-GCC:master with commit 1f8a1bb Nov 6, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants