Bug hunting; Code cleanup

This commit is contained in:
Daniel Marjamäki 2020-12-14 18:04:12 +01:00
parent 116119083b
commit 4e90356a76
1 changed files with 1 additions and 8 deletions

View File

@ -1636,14 +1636,7 @@ static ExprEngine::ValuePtr getValueRangeFromValueType(const std::string &name,
static ExprEngine::ValuePtr getValueRangeFromValueType(const ValueType *valueType, Data &data) static ExprEngine::ValuePtr getValueRangeFromValueType(const ValueType *valueType, Data &data)
{ {
if (valueType && valueType->pointer) { if (valueType && valueType->pointer) {
ExprEngine::ValuePtr val; ExprEngine::ValuePtr val = std::make_shared<ExprEngine::BailoutValue>();
if (valueType->pointer == 0 && valueType->isIntegral()) {
ValueType datatype(*valueType);
datatype.pointer = 0;
val = getValueRangeFromValueType(data.getNewSymbolName(), &datatype, *data.settings);
}
if (!val)
val = std::make_shared<ExprEngine::BailoutValue>();
auto bufferSize = std::make_shared<ExprEngine::IntRange>(data.getNewSymbolName(), 1, ExprEngine::ArrayValue::MAXSIZE); auto bufferSize = std::make_shared<ExprEngine::IntRange>(data.getNewSymbolName(), 1, ExprEngine::ArrayValue::MAXSIZE);
return std::make_shared<ExprEngine::ArrayValue>(data.getNewSymbolName(), bufferSize, val, true, true, false); return std::make_shared<ExprEngine::ArrayValue>(data.getNewSymbolName(), bufferSize, val, true, true, false);
} }