Skip to content

Commit b78df5d

Browse files
committed
fix
1 parent 5eb6f85 commit b78df5d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/tokenize.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8810,6 +8810,9 @@ 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(), "++|--")) {
8814+
syntaxError(tok, tok->str() + tok->strAt(1));
8815+
}
88138816
else if (Token::simpleMatch(tok, ") return") && !Token::Match(tok->link()->previous(), "if|while|for (")) {
88148817
if (tok->link()->previous() && tok->link()->previous()->isUpperCaseName())
88158818
unknownMacroError(tok->link()->previous());

0 commit comments

Comments
 (0)