Repository navigation
cpp call graph: name template conversion operators as the engine does (Part of #3784) - #6490
Merged
Merged
Conversation
… (Part of #3784) The libclang adapter spelled `operator Box<int>`; the engine says `operator Box`. Strip the template arguments like constructors. Document why gtest TEST bodies stay unmapped. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 24, 2026 15:59
squid-protocol
enabled auto-merge (squash)
October 24, 2026 16:03
Owner
Author
|
No description provided. |
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 #3784. Test/doc/baseline only: no engine change, no golden bless.
What changed
tests/tools/clang_callgraph.py: a template conversion operator is named without its template arguments (operator Box, notoperator Box<int>), as the engine names it.docs/graph_accuracy.mdC++ section.Class / Sibling gaps
Class: reference-adapter naming that differs from the engine's, so a def cannot be mapped by (path, name, line). Fixed here: template conversion operators (small: 11 links). Sibling gaps, not fixed:
TEST(suite, name)bodies (6,117 of 6,409caller_unmapped). I implemented the adapter naming; mapping them dropped confident precision 91.1 -> 79.1 and resolution recall 63.8 -> 56.5 (gate fails), so it is NOT in this PR. Cause:fmt::format(...)calls from test bodies resolve at thequalifiedstep toformatter<X>::formatintest/format-test.cc(525 wrong links, 242 qualified, 155 import, 102 file). Pre-existing resolver defect, hidden while callers were unmapped. A detectordef_shape=signaturefor TEST bodies did not help (the targets are real methods), so I dropped it.::namequalifier loss (detector._extract_name, 20 functions in fmt), needs a golden bless.not_extracted/other(gtestEXPECT_*macro callees,static_castconversion calls);TYPED_TESTbodies are not extracted by the engine; objective-c reference.Remaining slices
qualified/import/filesteps picking an unrelated same-name member forns::f(...). 2. Then the gtest adapter naming (GTEST_MACROon theTestBodyline, 2nd macro argument). 3.::nameloss.Plan deviation
The plan was adapter-only naming of gtest bodies plus conversion operators. The gtest half fails the gate for the reason above, so the PR shrank to the conversion operators.
Lessons for agents
Mapping many previously
caller_unmappededges surfaces resolver errors that were hidden; check thewrongsamples' targets before attributing a precision drop to the new naming.Cross-repo: none.
🤖 Generated with Claude Code