Repository navigation
Scratch/riel/weak named match - #109
Merged
rikvanriel merged 2 commits intoNov 8, 2026
Merged
rikvanriel merged 2 commits into
rikvanriel merged 2 commits into
Conversation
A member-name match with no receiver type reaches every call through a member of that name anywhere in the tree: bfa_msix, a sound codec and the Rust syn parser all showed up as dispatchers of kernel functions they cannot reach. The callers command already reports those as a count, not as an answer; the reverse-chain section now does the same. Sites that name the target outright still count as confident. Adds an end to end test with a typed struct dispatch beside an untyped same-named one: the typed site renders as an answer, the untyped one is counted and not answered. The test fails with the old rendering and passes with the new.
Matches stream in tree order, so a range that contains another claimed the inner one's calls first and the covered sets kept the first claim. A body the parser did not close (netdev_cmd_to_name spans 1921-13770 after an in-body define) then owned every call for eleven thousand lines: it directly called 1033 functions, and every dispatch site in the range was attributed to it, so callers deliver_skb named it and the ip_rcv chain showed it instead of deliver_skb. Parse first, attribute second: collect each match, run smallest span first, and let each call byte belong to exactly one function. A GNU nested function keeps its own calls instead of donating them outward. A scoped kernel reindex shows netdev_cmd_to_name dropping from 1033 direct callees to 12 gap-region macros, deliver_skb's callers losing it, and the ip_rcv chain naming deliver_skb and friends with the weak same-named sites counted, not answered. The function row still spans the parser's range; only attribution is fixed. Adds a nesting unit test that fails with file order and passes innermost-first.
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.
Fix some more function parsing issues, specifically netdev_cmd_to_name has a #define right in the middle of it, which threw off the treesitter parser, resulting in the rest of the file being assigned to that one function.