Repository navigation
Recover bounded C-family signature macros - #253
Merged
Merged
Conversation
tob-scott-a
force-pushed
the
codex/v010-signature-macros
branch
from
December 2, 2026 10:26
62a7213 to
a04cee7
Compare
tob-scott-a
force-pushed
the
codex/v010-signature-macros
branch
from
December 2, 2026 11:04
a04cee7 to
d58444a
Compare
tob-scott-a
force-pushed
the
codex/v010-signature-macros
branch
from
December 2, 2026 11:21
d58444a to
853621b
Compare
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.
Recover bounded object-like function signature macros in C, C++, and Objective-C. Recovered declarations retain their expanded names, parameters, return types, physical locations, and signature provenance; expanded callback parameters continue to shadow globals. This restores entrypoint detection for macro-defined
mainfunctions.Definitions must be unique, unconditional, and before their use. C can inspect literal in-root headers; C++ and Objective-C use same-file definitions. Expansion and parsing have explicit byte, alias, and nesting bounds. Original syntax diagnostics remain visible, and strict mode still rejects recovered source. Definitions whose earlier syntax lost context remain unresolved, including through aliases and C headers.
Validation: 7,230 tests passed with one Python-version skip; Ruff, formatting, and ty passed. The focused mutation campaign killed every mutant in the signature module and the reviewed macro helpers. Negative controls, exact expansion/include budgets, native type boundaries, original-range composition, and real-process parsing are covered. A deterministic work-bound test kills disabling the C++ body query. One private C default has a narrow equivalence review: ordinary callers supply it explicitly, and recovered callers cannot use it.
Closes #226.