Skip to content

Recover conditional C++ and Objective-C function profiles - #255

Merged
tob-scott-a merged 1 commit into
mainfrom
codex/v010-conditional-profiles
Dec 2, 2026
Merged

tob-scott-a merged 1 commit into
mainfrom
codex/v010-conditional-profiles

Conversation

@tob-scott-a

Copy link
Copy Markdown
Collaborator

Recover C++ and Objective-C functions hidden by conditional arms that split braces. The parser uses the first syntax profile with fewer grammar errors for the whole file, then unions verified affected declarations and nested callables from other profiles. Namespace and class owners remain distinct, including when one physical function belongs to alternative owners; independent declarations after a group keep their actual owner.

Recovery preserves source offsets, call-site evidence, original diagnostics, and source-file counts. Calls carry conditional provenance and stay uncertain after directory linking. Conflicting operand interpretations remain unknown. Enumeration is bounded at 64 recovery profiles and reports incomplete coverage; strict mode still rejects recovered source. The shared generator preserves C's existing profile bytes. Supported Objective-C nullability handling remains unchanged.

Validation: 7,218 tests passed with one Python-version skip; 878 focused checks passed after rebasing onto tree-sitter 0.27. Ruff, formatting, and ty passed. The focused campaign killed 118 mutants; the remaining zip-strictness mutation has a narrow, documented equivalence review. Tests cover all-arm calls, owner alternatives, nested functions, source boundaries, the profile cap, and real worker equality.

Depends on #253. Closes #224.

@tob-scott-a
tob-scott-a force-pushed the codex/v010-signature-macros branch from a04cee7 to d58444a Compare December 2, 2026 11:04
@tob-scott-a
tob-scott-a force-pushed the codex/v010-conditional-profiles branch from 2d33f7e to a313839 Compare December 2, 2026 11:05
@tob-scott-a
tob-scott-a changed the base branch from codex/v010-signature-macros to main December 2, 2026 11:05
@tob-scott-a
tob-scott-a force-pushed the codex/v010-conditional-profiles branch from a313839 to e65cbb3 Compare December 2, 2026 11:42
@tob-scott-a
tob-scott-a merged commit 21f6074 into main Dec 2, 2026
57 checks passed
@tob-scott-a
tob-scott-a deleted the codex/v010-conditional-profiles branch December 2, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C/C++: function silently dropped when #ifdef/#else branches each open a brace

1 participant