Skip to content

Expand function macros that have arguments at the end - #695

Open
pfultz2 wants to merge 3 commits into
cppcheck-opensource:masterfrom
pfultz2:recursive-expand-macro-function
Open

Expand function macros that have arguments at the end#695
pfultz2 wants to merge 3 commits into
cppcheck-opensource:masterfrom
pfultz2:recursive-expand-macro-function

Conversation

@pfultz2

@pfultz2 pfultz2 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #549

Comment thread simplecpp.cpp
// consumes that macro call from the token stream, so tok always advances.
/** Expand while the expansion result in @p temp ends with the name of a
* function-like macro whose arguments are supplied by the tokens after @p tok.
* Each round consumes that macro call from the token stream, so tok always

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure that "so tok always advances" will be true now. If rescanMacro returns false directly should we return tok->next?

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.

failure to preprocess zephyr (blinky example)

2 participants