Simplify condition

This commit is contained in:
Georgy Komarov 2020-07-18 07:07:20 +03:00
parent 382f21a5c9
commit 6bc13080ee
No known key found for this signature in database
GPG Key ID: 195B8622FE88ED46
1 changed files with 1 additions and 3 deletions

View File

@ -9631,9 +9631,7 @@ void Tokenizer::findGarbageCode() const
if (Token::simpleMatch(tok->next(), "( )"))
code = tok->str() + "()";
if (!code.empty()) {
if (isC())
syntaxError(tok, code);
if (tok->str() != ">" && !Token::simpleMatch(tok->previous(), "operator"))
if (isC() || (tok->str() != ">" && !Token::simpleMatch(tok->previous(), "operator")))
syntaxError(tok, code);
}
}