Skip to content

Token: do not update properties in varid() when the id did not change#7371

Merged
chrchr-github merged 1 commit intocppcheck-opensource:mainfrom
firewave:varid-reset
Mar 14, 2025
Merged

Token: do not update properties in varid() when the id did not change#7371
chrchr-github merged 1 commit intocppcheck-opensource:mainfrom
firewave:varid-reset

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

No description provided.

@firewave
Copy link
Copy Markdown
Collaborator Author

firewave commented Mar 12, 2025

This is mainly to address the reset of varids in Tokenizer::setVarId(). Pulled out of #7369 since it changes the behavior.

@firewave
Copy link
Copy Markdown
Collaborator Author

Because it avoids unnecessary calls to update_property_info() as a side effect it also improves the performance.

before:

61,554,791,410 (100.0%)  PROGRAM TOTALS

after:

60,890,768,272 (100.0%)  PROGRAM TOTALS

@chrchr-github chrchr-github merged commit 72dc99a into cppcheck-opensource:main Mar 14, 2025
60 checks passed
@firewave firewave deleted the varid-reset branch March 14, 2025 10:29
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