Skip to content

Commit b4ebcb4

Browse files
Update checkother.cpp
1 parent 7d609df commit b4ebcb4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/checkother.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3056,9 +3056,11 @@ void CheckOtherImpl::checkDuplicateExpression()
30563056
}
30573057
if (tok->str() != "=") {
30583058
const Token* par = tok->astParent();
3059-
while (par && tok->str() == par->str() && precedes(par, tok)) { // chain of identical operators with parentheses
3059+
while (par && tok->str() == par->str() && precedes(par->astOperand1(), tok)) { // chain of identical operators with parentheses
30603060
checkDuplicate(par->astOperand1(), tok->astOperand1(), par);
30613061
checkDuplicate(par->astOperand1(), tok->astOperand2(), par);
3062+
checkDuplicate(par->astOperand2(), tok->astOperand1(), par);
3063+
checkDuplicate(par->astOperand2(), tok->astOperand2(), par);
30623064
par = par->astParent();
30633065
}
30643066
}

0 commit comments

Comments
 (0)