Repository navigation
Nested macro names leave Calls Out To; re-bless against main (Part of #6770) - #6922
Merged
Merged
Conversation
Macro expansion in calls_out_to lists the functions a macro reaches, never a nested macro name. Regraft of #6903 onto current main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ro names (Part of #6770) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…620Z-regraft # Conflicts: # tests/call_graph_accuracy_baseline.json # tests/golden_doom_rosetta/fastdoom.json.gz # tests/golden_doom_rosetta/srb2.json.gz
#6770) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
Contributor
|
No description provided. |
This was referenced Oct 28, 2026
squid-shepherd Bot
pushed a commit
that referenced
this pull request
Oct 29, 2026
…it; clang baseline re-measured for #6930 (Part of #6266) (#7020) * callgraph: doomsday's last 3 misses and 16 engine-only edges (Part of #6266) Engine: a comment in a function-like macro body is no callee; a brace-init default holding a call keeps a nested constructor a unit; a template argument may hold decltype/sizeof(...). Oracle: a qualified or differently named ctor is no member of an unclosed class around it; an undefined owner class reads any listed base (as TextBody does), wrapper-suffixed headers (.h.old) declare classes; a file-scope label continues a closed-early body; an ERROR with a stray quote reads the body as text; a template call on a local is a comparison; a head run over declarations above the function takes the braces. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM * DOOM-rosetta: doomsday passes check 7; drop callgraph from its expected_fails; re-bless (Part of #6266) doomsday callgraph misses 3 -> 0, scored engine-only 16 -> 0, verdict 6/7 -> PERFECT; one more function (fontlinewrapping.cpp's nested Line constructor). Crucible: mlir flatbuffer_export.cc gains make_unique<decltype(..)>(. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM * calls_out: noexcept(...) is an unevaluated template operand too (Part of #6266) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM * DOOM-rosetta: re-bless doomsday after the main merge: check 7 passes (Part of #6266) engine-only 16 -> 0 (misses were 0 after #7014), verdict 6/7 -> PERFECT. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM * DOOM-rosetta nightly: a macro named like a declared function reaches it; clang baseline re-measured for #6930 (Part of #6266) A name that is both a function-like macro and a function the scan declares was dropped too, so a macro body that invokes it lost the call: prboom-plus `free(p)` -> `Z_Free(p)` -> `(Z_Free)(...)` (300 edges, clang recall 0.9975 -> 0.9303), fastdoom `LL_AddToTail` -> `LL_AddNode` (9), chocolate/crispy-doom `DEH_String` (2 each). c_repo_macro_body_calls now also collects the names the C/C++ texts declare or define as functions (a declarator line: type words, then `name(` or `(name)(`, a parameter list with no string, no second `(` after it); such a macro lists its own name, and _macro_expansion_callees lists a macro's own name instead of expanding it again. Non-function macro names still leave Calls Out To. Every clang and body-oracle number of the 15 C ports is again that of engine 2a023d3; the Graph Accuracy Audit stays at c fp 297, cpp fp 166 (the #6922 win). The rest of the nightly failure is #6930's reference change (compiler builtin headers on the path): fatal-error files fell, so disagreements that already existed became clean-file ones. They are identical at engine 2a023d3 and after this fix, so the clang section of callgraph_baseline.json is re-measured at this branch; the body-oracle section is unchanged. README triages the newly clean shapes. Re-bless DOOM-rosetta chocolate-doom, crispy-doom, fastdoom, srb2, doomsday: summary.callgraph_unscored only, back to the pre-#6922 values (69 -> 71, 39 -> 41, 71 -> 86, 2048 -> 2530, 4638 -> 4663); no check verdict moves. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Joe Esquibel <[email protected]>
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.
Part of #6770. Supersedes #6903 (regraft: a fresh branch off current main carrying #6903's two hand-written files; every generated file regenerated on this branch, none carried over).
Checklist: partial [c:93af939e] -- libclang reference
static inlineheader edges (clang_callgraph.py) not touched hereChange
When
calls_out_toexpands a macro, it lists the functions the macro reaches and never a nested macro name (detector.py,test_macro_body_calls_6770.py).c_repo_macro_body_callsnow lists every function-like macro, mapping a macro that calls nothing (or that two files define differently) to the empty set. Expansion can then tell a macro its body invokes from a function.Baseline refresh, traced per PR
golden_master_audit,zero_dep): re-blessed viagolden-lock.sh crucible_check.py --update --yeson eb5934f. Onlycalls_out_to,graph_sqliteandllm_briefmove, the same files as Nested macro names leave Calls Out To; re-bless against main (Part of #6770) #6903. Main's later commits (Main green: refresh call-graph accuracy baseline after #6864/#6870/#6881, re-bless 4 DOOM goldens after #6899 #6908, SET TERMINAL fault: pin CBSA scenarios, close checklist item (Part of #6882) #6909, docs) don't touch the engine.summary.callgraph_unscored), all blessed. Control with main's detector: odamex and gzdoom drift identically on main, so they were not blessed here (Main green: refresh call-graph accuracy baseline after #6864/#6870/#6881, re-bless 4 DOOM goldens after #6899 #6908 has since re-blessed them); doomsday isokon main, so its drift comes from this PR.call_graph_accuracy_baseline.json: Main green: refresh call-graph accuracy baseline after #6864/#6870/#6881, re-bless 4 DOOM goldens after #6899 #6908 refreshed it for main's drift. This PR's own effect: c precision 97.4 -> 97.7 (fp 331 -> 297), cpp precision 97.8 -> 97.9 (fp 172 -> 166). The regen also records perl recall 96.2 -> 96.3, an improvement from Perl calls: after { ; ? ., print handles, new Foo, qualified commands (Part of #6433) #6894 that Main green: refresh call-graph accuracy baseline after #6864/#6870/#6881, re-bless 4 DOOM goldens after #6899 #6908 left out.Class / Sibling gaps
Class: the names a macro expansion can put in Calls Out To (function names versus nested function-like or object-like macro names). Handled here: nested macro names are dropped and the functions they reach are listed (the tests cover nesting depth and cycles). Sibling gaps:
tests/tools/doom_speedrun/callgraph_baseline.json(the nightly C/C++ oracle; it needs--clangand fetched ports) is not refreshed here, so refresh it on the nightly run. The libclangstatic inlineheader blind spot (c:93af939e) remains.Gates
pr_gates --fast9/9;--ratchets9/9; tree guards 265 passed;test_macro_body_calls_6770.py19 passed;call_graph_accuracy --ciOK; fulldoom_rosetta_check: only the drifts above.Cross-repo: none.
🤖 Generated with Claude Code