From a501259dedbb88a6110c15d3e23df23e13a901f4 Mon Sep 17 00:00:00 2001 From: chrchr Date: Fri, 21 Jul 2023 11:53:28 +0200 Subject: [PATCH] Handle only operator --- lib/tokenize.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 16c4d6ff7a1..efd98d6f740 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -5249,7 +5249,8 @@ void Tokenizer::createLinks2() } else if (token->str() == "<" && ((token->previous() && (token->previous()->isTemplate() || (token->previous()->isName() && !token->previous()->varId()) || - (Token::Match(token->tokAt(-1), "]|)") && (!Token::Match(token->linkAt(-1)->previous(), "%name%|)") || token->linkAt(-1)->previous()->isKeyword())))) || + (token->strAt(-1) == "]" && (!Token::Match(token->linkAt(-1)->previous(), "%name%|)") || token->linkAt(-1)->previous()->isKeyword()) || + (token->strAt(-1) == ")" && token->linkAt(-1)->strAt(-1) == "operator")))) || Token::Match(token->next(), ">|>>"))) { type.push(token); if (token->previous()->str() == "template")