Skip to content

Commit

Permalink
Move check
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Mar 21, 2024
1 parent f99a972 commit a2b8a8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4971,7 +4971,9 @@ static void valueFlowLifetime(TokenList &tokenlist, ErrorLogger *errorLogger, co
valueFlowForwardLifetime(tok, tokenlist, errorLogger, settings);
}
// address of
else if (tok->isUnaryOp("&") && !Token::simpleMatch(tok->astParent(), "*")) {
else if (tok->isUnaryOp("&")) {
if (Token::simpleMatch(tok->astParent(), "*"))
continue;
for (const ValueFlow::LifetimeToken& lt : ValueFlow::getLifetimeTokens(tok->astOperand1())) {
if (!settings.certainty.isEnabled(Certainty::inconclusive) && lt.inconclusive)
continue;
Expand Down

0 comments on commit a2b8a8a

Please sign in to comment.