From f1eea546443f53989920bc48c9d5fbbed2bf4d93 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Mon, 27 Apr 2026 09:28:36 +0200 Subject: [PATCH 1/3] 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 3df17141f24..e525bdd7609 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -446,7 +446,7 @@ static Token* skipDecl(Token* tok, std::vector* inner = nullptr) if (!Token::Match(tok->previous(), "( %name%")) return tok; Token *vartok = tok; - while (Token::Match(vartok, "%name%|*|&|::|<")) { + while (Token::Match(vartok, "%name%|*|&|&&|::|<")) { if (vartok->str() == "<") { if (vartok->link()) vartok = vartok->link(); From a9a94fbe080ee8a2f741dd6a06077864451e6cf7 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Mon, 27 Apr 2026 09:33:29 +0200 Subject: [PATCH 2/3] Update testvalueflow.cpp --- test/testvalueflow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/testvalueflow.cpp b/test/testvalueflow.cpp index d8a5b533bf3..ff5d18b3175 100644 --- a/test/testvalueflow.cpp +++ b/test/testvalueflow.cpp @@ -5277,6 +5277,12 @@ class TestValueFlow : public TestFixture { " continuous_src_time(std::complex f, double st = 0.0, double et = infinity) {}\n" "};"; (void)testValueOfX(code, 2U, 2); // Don't crash (#6494) + + code = "struct S {\n" // #14693 + " int i;\n" + " explicit S(std::string&& s = {}) : i(0) {}\n" + "};"; + ASSERT_EQUALS(false, testKnownValueOfTok(code, "{ } )", 0)); } bool isNotKnownValues(const char code[], const char str[]) { From 05d09aedde89e9d0e9bc8a7ec0aae668d46c423e Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Mon, 27 Apr 2026 09:34:30 +0200 Subject: [PATCH 3/3] Update testsymboldatabase.cpp --- test/testsymboldatabase.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/testsymboldatabase.cpp b/test/testsymboldatabase.cpp index 8348e0cd44b..6efda65c11b 100644 --- a/test/testsymboldatabase.cpp +++ b/test/testsymboldatabase.cpp @@ -587,6 +587,7 @@ class TestSymbolDatabase : public TestFixture { TEST_CASE(valueType3); TEST_CASE(valueTypeThis); TEST_CASE(valueTypeChar); + TEST_CASE(valueTypeRValueReference); TEST_CASE(variadic1); // #7453 TEST_CASE(variadic2); // #7649 @@ -10175,6 +10176,10 @@ class TestSymbolDatabase : public TestFixture { ASSERT_EQUALS("char", typeOf("char buf[10]; buf[0] = 'x';", "[ 0 ]", true, &s)); } + void valueTypeRValueReference() { + TODO_ASSERT_EQUALS("", "bool", typeOf("void f(std::string&& s = {})", "&&")); + } + void variadic1() { // #7453 { GET_SYMBOL_DB("CBase* create(const char *c1, ...);\n"