Fix testrunner
This commit is contained in:
parent
269d21e972
commit
cefd7fb33f
|
@ -214,6 +214,9 @@ static bool getDimensionsEtc(const Token * const arrayToken, const Settings *set
|
||||||
Dimension dim;
|
Dimension dim;
|
||||||
dim.known = value->isKnown();
|
dim.known = value->isKnown();
|
||||||
dim.tok = nullptr;
|
dim.tok = nullptr;
|
||||||
|
int typeSize = array->valueType()->typeSize(*settings);
|
||||||
|
if (typeSize == 0)
|
||||||
|
return false;
|
||||||
dim.num = value->intvalue / array->valueType()->typeSize(*settings);
|
dim.num = value->intvalue / array->valueType()->typeSize(*settings);
|
||||||
dimensions->emplace_back(dim);
|
dimensions->emplace_back(dim);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6129,10 +6129,10 @@ std::string ValueType::dump() const
|
||||||
|
|
||||||
MathLib::bigint ValueType::typeSize(const cppcheck::Platform &platform) const
|
MathLib::bigint ValueType::typeSize(const cppcheck::Platform &platform) const
|
||||||
{
|
{
|
||||||
if (pointer)
|
//if (pointer)
|
||||||
return platform.sizeof_pointer;
|
// return platform.sizeof_pointer;
|
||||||
|
|
||||||
if (typeScope && typeScope->definedType)
|
if (typeScope && typeScope->definedType && typeScope->definedType->sizeOf)
|
||||||
return typeScope->definedType->sizeOf;
|
return typeScope->definedType->sizeOf;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|
Loading…
Reference in New Issue