Merge overlapping patterns
This commit is contained in:
parent
ce95776abc
commit
3ab3715a88
|
@ -6067,8 +6067,7 @@ void Tokenizer::simplifyIfNot()
|
||||||
if (!tok)
|
if (!tok)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (Token::Match(tok, "0|false == (") ||
|
if (Token::Match(tok, "0|false == %name%|(")) {
|
||||||
Token::Match(tok, "0|false == %name%")) {
|
|
||||||
tok->deleteNext();
|
tok->deleteNext();
|
||||||
tok->str("!");
|
tok->str("!");
|
||||||
}
|
}
|
||||||
|
@ -6145,8 +6144,7 @@ void Tokenizer::simplifyIfNotNull()
|
||||||
if (!tok)
|
if (!tok)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (Token::simpleMatch(tok, "0 != (") ||
|
if (Token::Match(tok, "0 != %name%|(")) {
|
||||||
Token::Match(tok, "0 != %name%")) {
|
|
||||||
deleteFrom = tok->previous();
|
deleteFrom = tok->previous();
|
||||||
if (tok->tokAt(2))
|
if (tok->tokAt(2))
|
||||||
tok->tokAt(2)->isPointerCompare(true);
|
tok->tokAt(2)->isPointerCompare(true);
|
||||||
|
|
Loading…
Reference in New Issue