astutils.cpp: avoid redundant callback invocation in `isExpressionChangedAt()` (#4369)
This commit is contained in:
parent
0978cc2d46
commit
0f0c4061ff
|
@ -2482,10 +2482,11 @@ static bool isExpressionChangedAt(const F& getExprTok,
|
||||||
return true;
|
return true;
|
||||||
bool aliased = false;
|
bool aliased = false;
|
||||||
// If we can't find the expression then assume it is an alias
|
// If we can't find the expression then assume it is an alias
|
||||||
if (!getExprTok())
|
auto expr = getExprTok();
|
||||||
|
if (!expr)
|
||||||
aliased = true;
|
aliased = true;
|
||||||
if (!aliased)
|
if (!aliased)
|
||||||
aliased = isAliasOf(tok, getExprTok());
|
aliased = isAliasOf(tok, expr);
|
||||||
if (!aliased)
|
if (!aliased)
|
||||||
return false;
|
return false;
|
||||||
if (isVariableChanged(tok, 1, settings, cpp, depth))
|
if (isVariableChanged(tok, 1, settings, cpp, depth))
|
||||||
|
|
Loading…
Reference in New Issue