More selective match pattern

This commit is contained in:
Dmitry-Me 2017-09-18 02:45:02 +03:00
parent fe0a514a7c
commit 7d6ef71c4d
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ bool CheckCondition::assignIfParseScope(const Token * const assignTok,
if (Token::Match(tok2, "[(,] &| %varid% [,)]", varid)) { if (Token::Match(tok2, "[(,] &| %varid% [,)]", varid)) {
return true; return true;
} }
if (Token::Match(tok2,"&&|%oror%|( %varid% %any% %num% &&|%oror%|)", varid)) { if (Token::Match(tok2,"&&|%oror%|( %varid% ==|!= %num% &&|%oror%|)", varid)) {
const Token *vartok = tok2->next(); const Token *vartok = tok2->next();
const std::string& op(vartok->strAt(1)); const std::string& op(vartok->strAt(1));
const MathLib::bigint num2 = MathLib::toLongNumber(vartok->strAt(2)); const MathLib::bigint num2 = MathLib::toLongNumber(vartok->strAt(2));