From dff6332ae46c3740d159eea9a722ba764ff87559 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Tue, 28 Apr 2026 08:58:30 +0200 Subject: [PATCH 1/2] Update tokenlist.cpp --- lib/tokenlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index e525bdd7609..5f48baea018 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -1623,7 +1623,7 @@ static Token * createAstAtToken(Token *tok) if (Token::Match(tok, "%type%") && !Token::Match(tok, "return|throw|if|while|new|delete")) { bool isStandardTypeOrQualifier = false; Token* type = tok; - while (Token::Match(type, "%type%|*|&|<")) { + while (Token::Match(type, "%type%|*|&|&&|<")) { if (type->isName() && (type->isStandardType() || Token::Match(type, "const|mutable|static|volatile"))) isStandardTypeOrQualifier = true; if (type->str() == "<") { From d765edc9724f6abdc5944c7f3d53eec9b3497937 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Tue, 28 Apr 2026 08:59:35 +0200 Subject: [PATCH 2/2] Update testtokenize.cpp --- test/testtokenize.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 9b816a357b7..7b2bee0d80e 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -7527,6 +7527,7 @@ class TestTokenizer : public TestFixture { void astfuncdecl() { ASSERT_EQUALS("", testAst("bool operator==(const S& a, const S& b);", AstStyle::Simple, ListSimplification::Full)); ASSERT_EQUALS("", testAst("::int32_t f();")); + ASSERT_EQUALS("", testAst("void f(int&& var);")); } void astarrayinit() { // #11738