From bef87656cc5b901bf0af69af06866d08480efb4c Mon Sep 17 00:00:00 2001 From: chrchr Date: Tue, 12 Mar 2024 15:56:58 +0100 Subject: [PATCH] syntaxError --- lib/tokenize.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index da1a6fd0456..dfd9ed8bc79 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -8401,6 +8401,9 @@ void Tokenizer::findGarbageCode() const else if (Token::Match(tok, "%assign% [") && Token::simpleMatch(tok->linkAt(1), "] ;")) syntaxError(tok, tok->str() + "[...];"); + else if (Token::Match(tok, "[({<] %assign%")) + syntaxError(tok); + // UNKNOWN_MACRO(return) if (tok->isKeyword() && Token::Match(tok, "throw|return )") && Token::Match(tok->linkAt(1)->previous(), "%name% (")) unknownMacroError(tok->linkAt(1)->previous());