Fix Match pattern (#4025)
This commit is contained in:
parent
28cf14f110
commit
6e69b751eb
|
@ -1098,7 +1098,7 @@ static Token * valueFlowSetConstantValue(Token *tok, const Settings *settings, b
|
|||
sz1->variable()->isArray() &&
|
||||
!sz1->variable()->dimensions().empty() &&
|
||||
sz1->variable()->dimensionKnown(0) &&
|
||||
Token::Match(sz2->astOperand2(), "*|[") && Token::Match(sz2->astOperand2()->astOperand1(), "%var%", varid1)) {
|
||||
Token::Match(sz2->astOperand2(), "*|[") && Token::Match(sz2->astOperand2()->astOperand1(), "%varid%", varid1)) {
|
||||
ValueFlow::Value value(sz1->variable()->dimension(0));
|
||||
if (!tok2->isTemplateArg() && settings->platformType != cppcheck::Platform::Unspecified)
|
||||
value.setKnown();
|
||||
|
|
Loading…
Reference in New Issue