Skip to content

Fix #657: combineOperators(): &= gets split up incorrectly#658

Merged
danmar merged 2 commits into
cppcheck-opensource:masterfrom
ludviggunne:657
Jun 2, 2026
Merged

Fix #657: combineOperators(): &= gets split up incorrectly#658
danmar merged 2 commits into
cppcheck-opensource:masterfrom
ludviggunne:657

Conversation

@ludviggunne

Copy link
Copy Markdown
Contributor

No description provided.

@firewave firewave linked an issue Jun 2, 2026 that may be closed by this pull request
@danmar danmar merged commit 3c2a660 into cppcheck-opensource:master Jun 2, 2026
25 checks passed
Comment thread simplecpp.cpp
while (prev && prev->isOneOf(";{}()"))
while (prev && prev->isOneOf(";{}("))
prev = prev->previous;
executableScope.push(prev && prev->op == ')');

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.

It seems like this is now equivalent to push(false).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not if the initial tok->previous->op is ).

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.

combineOperators(): &= gets split up incorrectly

5 participants