From 6378441e3b3c6a32a6185903c31c2a2e4c2afcd6 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Fri, 12 Jun 2026 11:06:06 +0200 Subject: [PATCH 1/2] Update forwardanalyzer.cpp --- lib/forwardanalyzer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/forwardanalyzer.cpp b/lib/forwardanalyzer.cpp index 5c97528372b..0999a08d908 100644 --- a/lib/forwardanalyzer.cpp +++ b/lib/forwardanalyzer.cpp @@ -845,7 +845,7 @@ namespace { return Break(); } else if (Token* callTok = callExpr(tok)) { // TODO: Dont traverse tokens a second time - if (start != callTok && tok != callTok && updateRecursive(callTok->astOperand1()) == Progress::Break) + if (start != callTok && tok != callTok && (tok->str() != "." || tok != callTok->astOperand1()) && updateRecursive(callTok->astOperand1()) == Progress::Break) return Break(); // Since the call could be an unknown macro, traverse the tokens as a range instead of recursively if (!Token::simpleMatch(callTok, "( )") && From 24c376cd24a7510ebae7da511047d3c7fea3ce45 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Fri, 12 Jun 2026 11:07:34 +0200 Subject: [PATCH 2/2] Update testvalueflow.cpp --- test/testvalueflow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/testvalueflow.cpp b/test/testvalueflow.cpp index 65f198dcbab..7e4f9f55268 100644 --- a/test/testvalueflow.cpp +++ b/test/testvalueflow.cpp @@ -1077,6 +1077,14 @@ class TestValueFlow : public TestFixture { " }\n" "}\n"; ASSERT_EQUALS(false, testValueOfX(code, 13U, ValueFlow::Value::MoveKind::MovedVariable)); + + code = "struct S { int f(int); };\n" // #11751 + "S g(S);\n" + "void h() {\n" + " S x;\n" + " g(std::move(x)).f(1);\n" + "}\n"; + ASSERT_EQUALS(false, testValueOfX(code, 5U, ValueFlow::Value::MoveKind::MovedVariable)); } void valueFlowCalculations() {