Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/tokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8810,6 +8810,9 @@ void Tokenizer::findGarbageCode() const
if (!cpp || mSettings.standards.cpp < Standards::CPP20 || !Token::Match(tok->previous(), "%name% : %num% ="))
syntaxError(tok, tok->strAt(1) + " " + tok->strAt(2));
}
else if (!cpp && Token::Match(tok, "++|--") && Token::Match(tok->next(), "++|--")) {
Comment thread
ludviggunne marked this conversation as resolved.
Outdated
syntaxError(tok, tok->str() + tok->strAt(1));
}
else if (Token::simpleMatch(tok, ") return") && !Token::Match(tok->link()->previous(), "if|while|for (")) {
if (tok->link()->previous() && tok->link()->previous()->isUpperCaseName())
unknownMacroError(tok->link()->previous());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d(){e?&d=d++++F:a}
Loading