Skip to content

Commit 7cfa61f

Browse files
ludviggunnedanmar
andauthored
Refactor
Co-authored-by: Daniel Marjamäki <daniel.marjamaki@gmail.com>
1 parent 3cbcc32 commit 7cfa61f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/tokenize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8810,7 +8810,7 @@ void Tokenizer::findGarbageCode() const
88108810
if (!cpp || mSettings.standards.cpp < Standards::CPP20 || !Token::Match(tok->previous(), "%name% : %num% ="))
88118811
syntaxError(tok, tok->strAt(1) + " " + tok->strAt(2));
88128812
}
8813-
else if (!cpp && Token::Match(tok, "++|--") && Token::Match(tok->next(), "++|--")) {
8813+
else if (!cpp && Token::Match(tok, "++|-- ++|--")) {
88148814
syntaxError(tok, tok->str() + tok->strAt(1));
88158815
}
88168816
else if (Token::simpleMatch(tok, ") return") && !Token::Match(tok->link()->previous(), "if|while|for (")) {

0 commit comments

Comments
 (0)