refactor(lint): pass only gcx to late lint hooks - #1376
Merged
Conversation
DaniPopes
added a commit
to foundry-rs/foundry
that referenced
this pull request
Sep 4, 2026
Bump Solar to paradigmxyz/solar#1376, whose LateLintPass hooks receive only the global context, and update every pass accordingly. The bump also brings the new for-loop lowering that keeps the update statement on LoopSource::For instead of inside the body, so the loop-walking analyses now run the update after each completed iteration through the shared loop_update and loop_stmts helpers, and the lints that reverse-engineered the old lowering (ecrecover, function-selector-collision, cache-array-length, enumerable-loop-removal) read it directly.
DaniPopes
marked this pull request as ready for review
September 4, 2026 15:04
The HIR is reachable as gcx.hir, so LateLintPass hooks no longer take a separate hir parameter and LateLintVisitor no longer stores one. Hooks that only received the HIR now receive the global context instead.
DaniPopes
force-pushed
the
refactor/late-lint-pass-gcx
branch
from
September 4, 2026 15:06
5620a88 to
48ceb7f
Compare
DaniPopes
added a commit
to foundry-rs/foundry
that referenced
this pull request
Sep 4, 2026
Pin the merged paradigmxyz/solar#1376 instead of its branch head.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gcx<'hir>already exposes the HIR asgcx.hir, so everyLateLintPasshook now receives only the global context: the hooks that took bothgcxandhirdrop thehirparameter, and the hooks that took onlyhirtakegcxinstead, giving the whole trait one uniform shape.LateLintVisitorno longer stores a separate HIR handle and its constructor loses that argument.This is a breaking change for downstream lint passes (Foundry's lints are being updated alongside in foundry-rs/foundry#16621). Written with AI assistance (Claude Code).
🤖 Generated with Claude Code