Skip to content

Commit 8dc1bd6

Browse files
Update checkcondition.cpp
1 parent 0faaf14 commit 8dc1bd6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkcondition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ void CheckCondition::alwaysTrueFalse()
15451545
condition = parent->astParent()->astParent()->previous();
15461546
else if (Token::Match(tok, "%comp%"))
15471547
condition = tok;
1548-
else if (tok->str() == "(" && !Token::Match(parent, "%comp%|!"))
1548+
else if (tok->str() == "(" && astIsBool(parent) && Token::Match(parent, "%assign%"))
15491549
condition = tok;
15501550
else
15511551
continue;

0 commit comments

Comments
 (0)