fix #3110 (false positve: style) Boolean result is used in bitwise operation. Clarify expression with parentheses)
This commit is contained in:
parent
3f517b5f23
commit
735ff11469
|
@ -195,7 +195,8 @@ void CheckOther::clarifyCondition()
|
|||
if (Token::Match(tok2, "[&|^]"))
|
||||
{
|
||||
// don't write false positives when templates are used
|
||||
if (Token::Match(tok, "<|>") && Token::Match(tok2, "& ,|>"))
|
||||
if (Token::Match(tok, "<|>") && (Token::Match(tok2, "& ,|>") ||
|
||||
Token::Match(tok2->previous(), "const &")))
|
||||
continue;
|
||||
|
||||
clarifyConditionError(tok,false,true);
|
||||
|
|
Loading…
Reference in New Issue