Skip to content

Commit

Permalink
Update valueflow.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored May 23, 2024
1 parent 7962cfd commit 60a4a8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2205,6 +2205,8 @@ static Analyzer::Result valueFlowForward(Token* startToken,
const Function* f = Scope::nestedInFunction(startToken->scope());
if (f && f->functionScope)
endToken = f->functionScope->bodyEnd;
if (!endToken && exprTok && exprTok->variable() && !exprTok->variable()->isLocal())
endToken = startToken->scope()->bodyEnd;
return valueFlowForward(startToken, endToken, exprTok, std::move(v), tokenlist, errorLogger, settings, loc);
}

Expand Down

0 comments on commit 60a4a8a

Please sign in to comment.