From 6fb5db73efdf30b49714fe043c4cfd509a623326 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Mon, 29 Apr 2024 14:17:25 +0200 Subject: [PATCH] Update tokenize.cpp --- lib/tokenize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 354968b4b2a..c54bc1ef688 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -8713,7 +8713,7 @@ void Tokenizer::findGarbageCode() const for (const Token* inner = tok->next(); inner != end; inner = inner->next()) { if (inner->str() == "{") inner = inner->link(); - else if (inner->str() == ";" || Token::simpleMatch(inner, ", ,")) { + else if (inner->str() == ";" || (Token::simpleMatch(inner, ", ,") && (!isCPP() || !Token::simpleMatch(inner->previous(), "operator")))) { if (tok->tokAt(-1) && tok->tokAt(-1)->isUpperCaseName()) unknownMacroError(tok->tokAt(-1)); else