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

Cleanup ContextualASTVisitor #3271

Merged

Conversation

CohenArthur
Copy link
Member

As part of my cleanups for lang-items, which should land soon...

This uses the StackedContexts API which is safer than a simple vector for keeping track of context

@CohenArthur CohenArthur requested a review from P-E-P November 26, 2024 16:42
Copy link
Member

@P-E-P P-E-P left a comment

Choose a reason for hiding this comment

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

LGTM

@CohenArthur CohenArthur force-pushed the cleanup-contextual-ast-visitor branch 2 times, most recently from e49c162 to b036d91 Compare December 2, 2024 13:32
@CohenArthur CohenArthur enabled auto-merge December 2, 2024 13:32
gcc/rust/ChangeLog:

	* util/rust-stacked-contexts.h: Add new method to see what context we are currently in.
gcc/rust/ChangeLog:

	* ast/rust-ast-visitor.h: Replace context with StackedContexts.
	* ast/rust-ast-visitor.cc (ContextualASTVisitor::visit): Use new APIs.
	* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Likewise.
@CohenArthur CohenArthur force-pushed the cleanup-contextual-ast-visitor branch from b036d91 to 8ef5ee4 Compare December 2, 2024 13:42
@CohenArthur CohenArthur added this pull request to the merge queue Dec 2, 2024
Merged via the queue into Rust-GCC:master with commit 5434de6 Dec 2, 2024
13 checks passed
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