Repository navigation
cpp call graph: choose overloads by argument count (Part of #3784) - #6541
Conversation
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Waiting on an owner decision (asked privately, 2026-10-24). Nothing is needed from contributors; work resumes once it is answered. |
|
No description provided. |
…Part of #3784) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
No description provided. |
|
PR #6541 @ 23b74e0: 1 failed check(s) == full-suite part 2/3 (failure) -- real |
… the resolver prunes it (Part of #3784) C++ joined OVERLOAD_LANGS, so like Java (#3772) its detector keeps a bare `f(` in unit `f` with its argument count; the resolver links it only when the count picks a sibling overload and prunes it as recursion otherwise. The two cpp cases asserted the old detector-level drop; they now assert the detector row per language and that no recursion edge survives resolution in either. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No description provided. |
|
No description provided. |
Part of #3784 (slice 3).
C++ overloads are now chosen by the caller's argument counts, as Java's are (#3835).
cpp.pysetscalls_out_arities, andcall_resolver.OVERLOAD_LANGSgainscpp. A count that matches several overloads or none (default argument, variadic, uncountedType x(args)construction) leaves an ambiguousoverloadrow, never an edge.Class / Sibling gaps
Class: C++ calls to one of several same-named overloads of a class in one file were linked to an arbitrary one. Handled here: member and free-function overloads, constructor calls with a counted argument list. Not handled: a header declaration versus an out-of-line definition in another file are not grouped as overloads (same as Java), and
Type x(args)declarator constructions record no count, so they degrade to an ambiguous row (safe direction). The C side (hiredis/libuv) has no overloads: reference run unchanged (2,163 judged, precision 100.0%, recall 25.3%, resolution recall 58.8%); its 2,789 unmapped links are the open C item.Measured (fmt vs libclang 18.1.1,
call_graph_resolution.py cpp)The recall dip is the trade: calls the counts cannot choose are no longer guessed. Baseline regenerated.
Golden
Re-blessed with
golden-lock.sh crucible_check.py --update --yes. cpp call rows change (calls_out_to). Other languages move only in PageRank at the 1e-5 rounding step (repo-wide rank renormalisation as ambiguous cpp calls stop being edges), plus the LLM brief rollup.scope_check.py --expect cpplists exactly those.Cross-repo: none.
Overlap: PR #6500 (cpp.py, baseline, graph_accuracy.md) and #6510 (graph_accuracy.md) are open; whichever merges second merges main and regenerates the cpp baseline.
Tests:
tests/core_engine/test_call_resolver_overload_cpp_3784.py,tests/extraction/languages/test_calls_out_cpp_arities_3784.py;pr_gates --fast7/7.🤖 Generated with Claude Code
Rescue fix (bd89886)
full-suite part 2/3failed ontest_calls_out_scoped_same_name_5628.py::test_direct_recursion_stays_dropped[cpp]. The siblingtest_free_function_does_not_gain_an_edge_from_a_scoped_namesake[cpp]also fails locally. Both are expected under this PR: oncecppis inOVERLOAD_LANGS, its detector keeps a bare self call with its argument count, as Java does (#3772). The resolver then prunes it as recursion when the count picks the unit itself, or links it when the count picks a sibling overload. I checked this end to end:int r(int){r(n-1)}gives no edge, andr(int,int){r(n)}gives an edge tor(int). Both tests now assert the detector row per language, and that no recursion edge survives resolution in eithercorcpp. No engine change.tests/extractionandtests/core_enginepass (14,992 tests), andpr_gates --fastpasses 7/7.