◐ Shell
reader mode source ↗
Skip to content

astutils.cpp: added more bailouts in isMutableExpression()#6959

Closed
firewave wants to merge 5 commits into
cppcheck-opensource:mainfrom
firewave:expr-chg
Closed

astutils.cpp: added more bailouts in isMutableExpression()#6959
firewave wants to merge 5 commits into
cppcheck-opensource:mainfrom
firewave:expr-chg

Conversation

@firewave

Copy link
Copy Markdown
Collaborator

No description provided.

@firewave

firewave commented Oct 26, 2024

Copy link
Copy Markdown
Collaborator Author

@pfultz2 Please have a look. I obviously have no idea what I am doing.

The printing of the tokens we pass to isAliasOf() in isExpressionChangedAt() shows something like this:

{ 0 877 0
{ 0 877 1
std 0 877 0
std 0 877 1
:: 882 877 0
:: 882 877 1
strncmp 0 877 0
strncmp 0 877 1

The namespace prefix does not seem like any expression that might have any impact.

@pfultz2

pfultz2 commented Oct 26, 2024

Copy link
Copy Markdown
Contributor

Please have a look. I obviously have no idea what I am doing.

I dont really have a context of what you are trying to do here, but it is definitely problematic.

@firewave

Copy link
Copy Markdown
Collaborator Author

I dont really have a context of what you are trying to do here, but it is definitely problematic.

I want to reduce the amount of calls to isAliasOf() since most of the time during analysis is spent there.

@sonarqubecloud

Copy link
Copy Markdown

@firewave

Copy link
Copy Markdown
Collaborator Author

Closing in favor of #8145. This was mostly about starting a discussion.

@firewave firewave closed this Jan 21, 2026
@firewave firewave deleted the expr-chg branch January 21, 2026 19:47
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