ExprEngine: Throw exception if there is unhandled expression in assignment LHS
This commit is contained in:
parent
3e4dd9b354
commit
3699227b12
|
@ -877,6 +877,9 @@ static ExprEngine::ValuePtr executeAssign(const Token *tok, Data &data)
|
||||||
assignValue = simplifyValue(std::make_shared<ExprEngine::BinOpResult>(binop, lhsValue, rhsValue));
|
assignValue = simplifyValue(std::make_shared<ExprEngine::BinOpResult>(binop, lhsValue, rhsValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!assignValue)
|
||||||
|
throw VerifyException(tok, "Expression '" + tok->expressionString() + "'; No value for LHS!");
|
||||||
|
|
||||||
const Token *lhsToken = tok->astOperand1();
|
const Token *lhsToken = tok->astOperand1();
|
||||||
assignValue = truncateValue(assignValue, lhsToken->valueType(), data);
|
assignValue = truncateValue(assignValue, lhsToken->valueType(), data);
|
||||||
call(data.callbacks, tok, assignValue, &data);
|
call(data.callbacks, tok, assignValue, &data);
|
||||||
|
|
Loading…
Reference in New Issue