Skip to content

Commit b220ddc

Browse files
fixup! fixup! Fix #14826 valueflow: forward lifetimes through array and member subobjects
1 parent ce643cb commit b220ddc

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/valueflow.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,8 +2033,7 @@ static void valueFlowForwardLifetime(Token * tok, const TokenList &tokenlist, Er
20332033
if (val.lifetimeKind == ValueFlow::Value::LifetimeKind::Address)
20342034
val.lifetimeKind = ValueFlow::Value::LifetimeKind::SubObject;
20352035
}
2036-
std::vector<const Token*> parents = getLhsLifetimeParents(parent->astOperand1(), settings.library);
2037-
for (const Token *p : parents)
2036+
for (const Token *p : getLhsLifetimeParents(parent->astOperand1(), settings.library))
20382037
valueFlowForward(nextExpression, endOfVarScope, p, values, tokenlist, errorLogger, settings);
20392038
}
20402039
// Constructor

0 commit comments

Comments
 (0)