From b8522c50d6d8afa044e0f389ea7ab3bfafd6b840 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:00:37 +0200 Subject: [PATCH] Update valueflow.cpp --- lib/valueflow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 5f9b86adcf4..8885fc65d45 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -7141,6 +7141,8 @@ static void valueFlowContainerSize(const TokenList& tokenlist, const Token* containerTok = tok->astOperand1(); if (containerTok->exprId() == 0) continue; + if (containerTok->variable() && containerTok->variable()->isArray()) + continue; const Library::Container::Action action = containerTok->valueType()->container->getAction(tok->strAt(1)); if (action == Library::Container::Action::CLEAR) { ValueFlow::Value value(0);