fix(cpp): recover callables after preprocessor-gated signatures#949
Open
blankanswer wants to merge 2 commits into
Open
fix(cpp): recover callables after preprocessor-gated signatures#949blankanswer wants to merge 2 commits into
blankanswer 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>
Owner
|
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 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.
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.