Skip to content

Commit

Permalink
valueflow.cpp: added early out in valueFlowConditionExpressions()
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Nov 30, 2024
1 parent 76b2aef commit 9c2a6b4
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 @@ -3364,6 +3364,8 @@ static void valueFlowConditionExpressions(const TokenList& tokenlist,
}

std::vector<const Token*> conds = getConditions(condTok, "||");
if (conds.empty())
continue;

// Check else block
if (Token::simpleMatch(startTok->link(), "} else {")) {
Expand Down

0 comments on commit 9c2a6b4

Please sign in to comment.