Files
codegraph/__tests__
Colby McHenry ec8fe3f1f4 feat(impact): C++ free-function name extraction — stop naming functions after a param/return type
The C++ qualified-name resolver BFS-searched the whole declarator for a
`qualified_identifier`, INCLUDING the parameter list and the trailing return
type. So a plain free function `std::string TableFileName(const std::string&
dbname)` was named `string` (from the `std::string` parameter), and an
`auto to_string(...) -> std::string` was named `string` (from the trailing
return) — calls never resolved, `codegraph_node` couldn't find them, and the
defining file looked like nothing depended on it. This is how most free
functions in a namespaced C++ library look, so it was a broad miss.

Skip `parameter_list` and `trailing_return_type` when locating the function's
own qualified name; a non-qualified name correctly falls back to the default
declarator-name extraction (`TableFileName`, not `string`).

Measured: leveldb 91.7% → 94.8% fair cross-file dependent coverage; fmt went from
32 functions mis-named after a bare type to 1; redis (C, unaffected — uses no
qualified-name resolver) held at 92.2%, its residual being genuine frontiers
(generated command tables, macro-reached code, function-pointer command dispatch,
example modules). Node count stable (functions were already nodes, just
mis-named). Full suite green; qualified methods (`Foo::bar`) unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 11:06:05 -04:00
..