Skip to content

review: Verify function-like macro expansion#33

Merged
arighi merged 1 commit into
mainfrom
function-like-macro
Jul 7, 2026
Merged

review: Verify function-like macro expansion#33
arighi merged 1 commit into
mainfrom
function-like-macro

Conversation

@arighi

@arighi arighi commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Review findings that reason from the unexpanded spelling of a function-like macro can misinterpret a formal parameter as a literal token. This can produce false positives even when normal preprocessing substitutes the intended argument. A protected fast-review finding then survives unless a specialist challenges it.

Require token-by-token expansion across the fast review, execution specialist, false-positive guidance, and findings validator. Cover formal parameter substitution, nested rescanning, member-access punctuation, stringification, token pasting, and variadic arguments. Require decisions to use the final expanded token stream.

Add regression assertions for every prompt path so the expansion requirements cannot be dropped independently.

Review findings that reason from the unexpanded spelling of a
function-like macro can misinterpret a formal parameter as a literal
token. This can produce false positives even when normal preprocessing
substitutes the intended argument. A protected fast-review finding then
survives unless a specialist challenges it.

Require token-by-token expansion across the fast review, execution
specialist, false-positive guidance, and findings validator. Cover
formal parameter substitution, nested rescanning, member-access
punctuation, stringification, token pasting, and variadic arguments.
Require decisions to use the final expanded token stream.

Add regression assertions for every prompt path so the expansion
requirements cannot be dropped independently.

Signed-off-by: Andrea Righi <arighi@nvidia.com>
@arighi arighi requested a review from nirmoy July 7, 2026 06:22
@arighi arighi merged commit 5ae61f8 into main Jul 7, 2026
4 checks passed
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.

2 participants