Repository navigation
C++: a class-template member keeps its class in its name (Part of #3772) - #6639
Conversation
`Foo<T>::bar() {` was named `::bar` (the name tokenizer split at the class
template's argument list), so libclang's `Foo::bar` had no engine counterpart
and the header's `Foo<T>::m(` read as a self-call. cpp now strips a template
argument list directly followed by `::`, in both the name and the own-header
filter. fmt: linked edges 2089 -> 2139, recall 21.5% -> 22.0%, resolution
recall 59.8% -> 61.3%, confident precision 92.5% -> 92.2% (inside tolerance).
Golden drift: 20 calls_out_to lists (godot, powertoys) lose the unit's own
header name; no other change.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
PR #6639 @ 2688ab0: 1 failed check(s) == shard 1 (1669449 LOC) (failure) -- real |
|
No description provided. |
…mber names (Part of #3772) Only func_hash moved: 18 header files in doom3-bfg and 3 in doomsday, all class-template member definitions now named Class::member instead of ::member. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
No description provided. |
|
PR #6639 @ c7e9946: 1 failed check(s) == shard 2 (1666363 LOC) (failure) -- real |
…ged engine (Part of #6266) doom3-bfg / doomsday: #6639's function names plus this branch's oracle numbers. gzdoom: #6639's class-template member names in vectors.h / weightedlist.h (#6639 did not re-bless gzdoom); rescan confirmed stable. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Part of #3772 (compiler call-graph comparison).
What
cpp had the lowest agreement with its compiler reference (libclang 18.1.1 on fmtlib/fmt: recall 21.5%, resolution recall 59.8%; rust 60.1%, c 36.7% for comparison).
Foo<T>::bar() {was named::bar: the name tokenizer split at the class template's<,,,>and kept the tail, so libclang'sFoo::barhad no engine counterpart (caller_unmapped), and the header's ownFoo<T>::m(read as a call tom. cpp now strips a template argument list directly followed by::(constructors, destructors, operators,ns::Foo<T>::m,template<>specialisations), and the own-header filter strips it too.operator<,operator<<and return-type<...>are untouched.Before / after (fmt,
callgraph_triage.py cpp)caller_unmappedwrong/unmapped_srcwrongandunmapped_srcrose because callers that were unnamed now enter the judged set with their links; I did not read those 10 extra wrong links in source one by one.Golden drift: 20
calls_out_tolists (godot node/editor_node/main/variant, powertoys FancyZones) lose the unit's own header name, plus 5 graph-sqlite hashes. No other change.Class / Sibling gaps
Class: class-template qualifier in a C++ member definition name. Siblings fixed with it: ctor/dtor/operator/namespace-qualified/specialisation forms and the matching header self-call.
Sibling gaps (no issues filed; no burned-estate program needs any of them):
namespace n { template<class T> T Box<T>::get() {...} }on one line is not extracted at all (different mechanism).TestBodynaming trade-off.x.m()receiver typing (ambiguous/receiver, 374 edges).Type::new(needs the impl type as owner.Tests and gates
New
tests/extraction/languages/test_cpp_template_member_names_3772.py; cpp extraction tests (394) andtest_detector.py(219) pass;callgraph_checktests step 383 passed;audit_check.pyall clear;pr_gates.py --fast7/7. Not run: full suite,--ratchets, crucible CI legs. libclang was installed to scratch (pip --target) since the selfscan venv lacks it.Merged origin/main before pushing (PR #6394 overlaps galaxyscope.py; I did not touch it).
Lessons for agents
callgraph_check.pyruns its gate in a subprocess that does not see a scratchPYTHONPATHlibclang via heavy-run: runcall_graph_resolution.py cpp --ci/--regeneratedirectly withPYTHONPATHset.🤖 Generated with Claude Code