1 parent 3cbcc32 commit 7cfa61fCopy full SHA for 7cfa61f
1 file changed
lib/tokenize.cpp
@@ -8810,7 +8810,7 @@ void Tokenizer::findGarbageCode() const
8810
if (!cpp || mSettings.standards.cpp < Standards::CPP20 || !Token::Match(tok->previous(), "%name% : %num% ="))
8811
syntaxError(tok, tok->strAt(1) + " " + tok->strAt(2));
8812
}
8813
- else if (!cpp && Token::Match(tok, "++|--") && Token::Match(tok->next(), "++|--")) {
+ else if (!cpp && Token::Match(tok, "++|-- ++|--")) {
8814
syntaxError(tok, tok->str() + tok->strAt(1));
8815
8816
else if (Token::simpleMatch(tok, ") return") && !Token::Match(tok->link()->previous(), "if|while|for (")) {
0 commit comments