Skip to content

Commit

Permalink
Update tokenize.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Apr 29, 2024
1 parent cf09473 commit 6fb5db7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6fb5db7

Please sign in to comment.