Skip to content

Commit 076bafd

Browse files
Update valueflow.cpp
1 parent 926fe38 commit 076bafd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/valueflow.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3606,6 +3606,8 @@ static void valueFlowSymbolic(const TokenList& tokenlist, const SymbolDatabase&
36063606
continue;
36073607
if (tok->astOperand2()->exprId() == 0)
36083608
continue;
3609+
if (tok->astOperand2()->variable() && tok->astOperand2()->variable()->isArray() && tok->astOperand2()->variable()->getTypeName() != "std::array) // array to pointer decay
3610+
continue;
36093611
if (!isConstExpression(tok->astOperand2(), settings.library))
36103612
continue;
36113613
if (tok->astOperand1()->valueType() && tok->astOperand2()->valueType()) {

0 commit comments

Comments
 (0)