ExprEngine: container value
This commit is contained in:
parent
e879de6489
commit
7b50b76b89
|
@ -877,6 +877,13 @@ static ExprEngine::ValuePtr executeAssign(const Token *tok, Data &data)
|
|||
assignValue = simplifyValue(std::make_shared<ExprEngine::BinOpResult>(binop, lhsValue, rhsValue));
|
||||
}
|
||||
|
||||
if (!assignValue && tok->astOperand2()->valueType() && tok->astOperand2()->valueType()->container && tok->astOperand2()->valueType()->container->stdStringLike) {
|
||||
auto size = std::make_shared<ExprEngine::IntRange>(data.getNewSymbolName(), 0, ~0ULL);
|
||||
auto value = std::make_shared<ExprEngine::IntRange>(data.getNewSymbolName(), -128, 127);
|
||||
assignValue = std::make_shared<ExprEngine::ArrayValue>(data.getNewSymbolName(), size, value);
|
||||
call(data.callbacks, tok->astOperand2(), assignValue, &data);
|
||||
}
|
||||
|
||||
if (!assignValue)
|
||||
throw VerifyException(tok, "Expression '" + tok->expressionString() + "'; Failed to evaluate RHS");
|
||||
|
||||
|
|
Loading…
Reference in New Issue