Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Apr 29, 2024
1 parent a17ab85 commit 6f19003
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/checkassert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ void CheckAssert::assertWithSideEffects()
for (const Token* tok = mTokenizer->list.front(); tok; tok = tok->next()) {
if (!Token::simpleMatch(tok, "assert ("))
continue;
if (Token::Match(tok->next()->astOperand1(), "%cop%")) // bailout
if (Token::Match(tok->next()->astOperand2(), "%cop%")) // bailout
continue;

const Token *endTok = tok->next()->link();
for (const Token* tmp = tok->next(); tmp != endTok; tmp = tmp->next()) {
if (Token::simpleMatch(tmp, "sizeof ("))
tmp = tmp->linkAt(1);
if (findLambdaEndToken(tmp)) // bailout
continue;
break;

checkVariableAssignment(tmp, tok->scope());

Expand Down

0 comments on commit 6f19003

Please sign in to comment.