Added missing relational operators to pattern, as suggested in #6189

This commit is contained in:
PKEuS 2014-10-16 20:37:21 +02:00
parent a99fd364ef
commit 079f495455
1 changed files with 2 additions and 2 deletions

View File

@ -425,9 +425,9 @@ void CheckNullPointer::nullConstantDereference()
}
const Variable *ovar = nullptr;
if (Token::Match(tok, "0 ==|!= %var% !!."))
if (Token::Match(tok, "0 ==|!=|>|>=|<|<= %var% !!."))
ovar = tok->tokAt(2)->variable();
else if (Token::Match(tok, "%var% ==|!= 0"))
else if (Token::Match(tok, "%var% ==|!=|>|>=|<|<= 0"))
ovar = tok->variable();
else if (Token::Match(tok, "%var% =|+ 0 )|]|,|;|+"))
ovar = tok->variable();