Skip to content

calls_out: decltype/sizeof operand in template args; oracle local/folded-head reads (Part of #6266) - #7014

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/6266-20261029T1429Z
Oct 29, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/6266-20261029T1429Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6266 (DOOM-rosetta check 7, doomsday). At 5346a34 doomsday had 3 misses + 16 scored engine-only. This closes the 3 misses.

Checklist: partial [c:0254d813] -- doomsday still has 16 scored engine-only edges (callgraph stays in its expected_fails)

Changes

  • Engine (_shared_patterns.py): CALLS_OUT_C_STYLE_GENERIC accepts an unevaluated operand (decltype|sizeof|alignof|noexcept + one paren level) inside template arguments: de::map<decltype(segments)>(sorted, f) was no call (doomsday line.cpp sortSegments -> map).
  • Oracle (callgraph_oracle.py): (a) a template_function whose name is a local variable is no call (delta < e || delta > (360 - e) parses as delta<e||delta>(..), edgetip.h at -> delta); (b) a node whose head folds members above the function (a DE_AUDIENCE(..) macro with no ;) is read by the function's own braces (surface.h hasSkyMaskedMaterial -> surfaceMaterialChanged).
  • Tests: test_calls_out_c_family_ordinary_names_6266.py, test_callgraph_oracle.py. Goldens: doomsday (misses 3 -> 0), odamex (one more unscored type edge: remove_cvref_t<decltype(arg)>(), precision 0.9829 -> 0.9828), crucible mlir flatbuffer_export.cc gains make_unique<decltype(..)>( (both fixtures, one function).

Class / Sibling gaps

Class: a C-family call the engine or oracle misreads because of parentheses or a comparison inside <...>. Members: f<decltype(x)>(..), f<sizeof(T)>(..), f<alignof(T)>(..), f<noexcept(x)>(..) handled and tested; local-vs-template comparison handled in the oracle; folded macro head handled in the oracle. Not handled: an operand with nested parens (take<noexcept(h())>(c), shared pattern is one level, nesting needs a different mechanism) and a decltype holding =, |, ! or ?. Doomsday engine-only (16, not in this slice): .old x4 (no class decl), packageswidget Impl/PackagesWidget -> Base/GuiWidget x3, fontlinewrapping DE_PIMPL_NOREF -> line, inputdevice description -> isActive/name (comment/string), amethyst filledLine x3, fluid context x2, plus the 2020 unscored type / 186 function-pointer kinds.

Gates

doom_rosetta_check (all ports: only doomsday, odamex moved), crucible_check bless (both legs), pr_gates --fast 9/9, --ratchets 9/9, tree-wide guards + audit_check pass.

🤖 Generated with Claude Code

…-template and folded-head reads (Part of #6266)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 29, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 29, 2026 15:13
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 29, 2026 15:13
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot merged commit ddf9083 into main Oct 29, 2026
121 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/6266-20261029T1429Z branch October 29, 2026 15:31
squid-shepherd Bot pushed a commit that referenced this pull request Oct 29, 2026
…ry expected_fails (Part of #6266) (#7019)

* 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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Joe Esquibel <[email protected]>
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant