From f37434cd1d5dada3579a2909ac85c2e6154a9c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 10 Aug 2018 12:26:53 +0200 Subject: [PATCH] valueFlowContainerReverse: Fix FPs when there is assignment --- lib/valueflow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 38ec9f4e5..cb0975d93 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -3420,6 +3420,8 @@ static void valueFlowContainerReverse(const Token *tok, unsigned int containerId break; if (tok->varId() != containerId) continue; + if (Token::Match(tok, "%name% =")) + break; if (!tok->valueType() || !tok->valueType()->container) continue; if (Token::Match(tok, "%name% . %name% (") && tok->valueType()->container->getAction(tok->strAt(2)) != Library::Container::Action::NO_ACTION)