From 3f7dd165cba35fc72db6cdf8f7332c7572d55308 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:41:41 +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 77d797eb0a4..c0e4cfcf5fe 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -8636,7 +8636,7 @@ void Tokenizer::findGarbageCode() const syntaxError(tok); if (Token::Match(tok, "%assign% typename|class %assign%")) syntaxError(tok); - if (Token::Match(tok, "%assign% [;)}]") && (!isCPP() || !Token::Match(tok->previous(), "operator %assign% ;"))) + if (Token::Match(tok, "%assign% [;)}]") && (!isCPP() || !Token::simpleMatch(tok->previous(), "operator"))) syntaxError(tok); if (Token::Match(tok, "%cop%|=|,|[ %or%|%oror%|/|%")) syntaxError(tok);