cppcheck icon indicating copy to clipboard operation
cppcheck copied to clipboard

astutils.cpp: added more bailouts in `isMutableExpression()`

Open firewave opened this issue 1 year ago • 4 comments

firewave avatar Oct 26 '24 21:10 firewave

@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.

firewave avatar Oct 26 '24 22:10 firewave

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.

pfultz2 avatar Oct 26 '24 22:10 pfultz2

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.

firewave avatar Oct 26 '24 22:10 firewave