Skip to content

Commit

Permalink
Update checkcondition.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed May 13, 2024
1 parent a9e479a commit b06ae86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/checkcondition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ void CheckCondition::multiCondition2()

// Condition..
const Token *cond2 = tok->str() == "if" ? condStartToken->astOperand2() : condStartToken->astOperand1();
const bool isReturnVar = (tok->str() == "return" && !Token::Match(cond2, "%cop%"));
const bool isReturnVar = (tok->str() == "return" && (!Token::Match(cond2, "%cop%") || (cond2 && cond2->isUnaryOp("!"))));

ErrorPath errorPath;

Expand Down

0 comments on commit b06ae86

Please sign in to comment.