fix(cpp): recover callables after preprocessor-gated signatures#949
fix(cpp): recover callables after preprocessor-gated signatures#949blankanswer wants to merge 2 commits into
Conversation
Signed-off-by: Blank_Answer <97771966+blankanswer@users.noreply.github.com>
Signed-off-by: Blank_Answer <97771966+blankanswer@users.noreply.github.com>
|
Thanks for the focused C++ parser fix. Triage: parser recovery bug for #946, normal priority. Review focus is ownership of recovered callables, avoiding duplicate definitions across #ifdef branches, and keeping unrelated extraction behavior unchanged. |
|
This is the fix we most wanted from the 0.9.1-rc bug queue — the coverage signal we shipped this week (#963/#968) flagged exactly this class on our own codebase (#961: Two things before merge:
Genuinely excited about this one — with the rebase + the line-coordinate decision it merges. |
Summary
Fixes #946.
C++ files that gate alternate out-of-line method signatures with
#ifdef/#else/#endifcan confuse the raw tree-sitter parse and cause methods after the conditional block to disappear from the graph.This PR extends the existing C/C++/CUDA preprocessor second pass so it can recover missing
Function/Methoddefinitions from the expanded AST, while keeping the normal raw-source extraction as the primary source of truth.What Changed
Modulenode or variables.label + qualified_name.Validation
make -f Makefile.cbm SANITIZE= build/c/test-runner build/c/codebase-memory-mcpbuild/c/test-runner extraction— 211 passedbuild/c/test-runner c_lsp— 750 passedgit diff --checkindex_repositorysearch_graphverified bothcommitandcompositeare indexed after the#ifdef/#else/#endifsignature block.