Added missing relational operators to pattern, as suggested in #6189
This commit is contained in:
parent
a99fd364ef
commit
079f495455
|
@ -425,9 +425,9 @@ void CheckNullPointer::nullConstantDereference()
|
||||||
}
|
}
|
||||||
|
|
||||||
const Variable *ovar = nullptr;
|
const Variable *ovar = nullptr;
|
||||||
if (Token::Match(tok, "0 ==|!= %var% !!."))
|
if (Token::Match(tok, "0 ==|!=|>|>=|<|<= %var% !!."))
|
||||||
ovar = tok->tokAt(2)->variable();
|
ovar = tok->tokAt(2)->variable();
|
||||||
else if (Token::Match(tok, "%var% ==|!= 0"))
|
else if (Token::Match(tok, "%var% ==|!=|>|>=|<|<= 0"))
|
||||||
ovar = tok->variable();
|
ovar = tok->variable();
|
||||||
else if (Token::Match(tok, "%var% =|+ 0 )|]|,|;|+"))
|
else if (Token::Match(tok, "%var% =|+ 0 )|]|,|;|+"))
|
||||||
ovar = tok->variable();
|
ovar = tok->variable();
|
||||||
|
|
Loading…
Reference in New Issue