File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -669,6 +669,7 @@ void KTestObjectParser::assignTypeUnnamedVar(
669
669
Tests::MethodParam param = {fieldType.baseTypeObj (1 ), " " , std::nullopt};
670
670
order.emplace (indObj, param, curType.paramValue );
671
671
visited[indObj] = true ;
672
+ usages[indObj] = types::PointerUsage::PARAMETER;
672
673
}
673
674
}
674
675
}
@@ -716,14 +717,17 @@ size_t KTestObjectParser::getOffsetInStruct(Tests::TypeAndVarName &objTypeAndNam
716
717
objTypeAndName.type = objTypeAndName.type .baseTypeObj ();
717
718
size_t sizeInBits = typesHandler.typeSize (objTypeAndName.type );
718
719
size_t offset = offsetInBits / sizeInBits;
720
+ offsetInBits %= sizeInBits;
721
+ if (objTypeAndName.varName .empty ()) {
722
+ return offsetInBits;
723
+ }
719
724
std::string indices;
720
725
while (dimension != 0 ) {
721
726
size_t index = offset % sizes[--dimension];
722
727
offset /= sizes[dimension];
723
728
indices = StringUtils::stringFormat (" [%d]%s" , index, indices);
724
729
}
725
730
objTypeAndName.varName += indices;
726
- offsetInBits %= sizeInBits;
727
731
return offsetInBits;
728
732
}
729
733
You can’t perform that action at this time.
0 commit comments