Skip to content

Commit e3afc01

Browse files
fixup! valueflow: forward lifetimes through array and member subobjects
1 parent c38cc0e commit e3afc01

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/valueflow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,8 +2034,8 @@ static void valueFlowForwardLifetime(Token * tok, const TokenList &tokenlist, Er
20342034
val.lifetimeKind = ValueFlow::Value::LifetimeKind::SubObject;
20352035
}
20362036
std::vector<const Token*> parents = getLhsLifetimeParents(parent->astOperand1(), settings.library);
2037-
for (const Token *parent : parents)
2038-
valueFlowForward(nextExpression, endOfVarScope, parent, values, tokenlist, errorLogger, settings);
2037+
for (const Token *p : parents)
2038+
valueFlowForward(nextExpression, endOfVarScope, p, values, tokenlist, errorLogger, settings);
20392039
}
20402040
// Constructor
20412041
} else if (Token::simpleMatch(parent, "{") && !isScopeBracket(parent)) {

0 commit comments

Comments
 (0)