Fix CodeCheck

Signed-off-by: hufeng <hufeng20@huawei.com>
Change-Id: Iaf5be30bbbf3adb99d71e6d1170a0d4709f26903
This commit is contained in:
hufeng 2024-04-01 02:55:21 +00:00
parent 8f85255b4a
commit b51df0269e

View File

@ -212,8 +212,15 @@ void DebugInfoExtractor::Extract(const File *pf)
const char *class_name = utf::Mutf8AsCString(pf->GetStringData(cda.GetClassId()).data);
dda.EnumerateParameters([&](File::EntityId &param_id) {
ParamInfo info;
if (param_id.IsValid() && !mda.HasValidProto()) {
info.name = utf::Mutf8AsCString(pf->GetStringData(param_id).data);
// get signature of <any> type
info.signature = Type::GetSignatureByTypeId(Type(Type::TypeId::TAGGED));
param_info.emplace_back(info);
return;
}
if (param_id.IsValid()) {
if (mda.HasValidProto()) {
info.name = utf::Mutf8AsCString(pf->GetStringData(param_id).data);
if (first_param && !mda.IsStatic()) {
info.signature = class_name;
@ -226,11 +233,6 @@ void DebugInfoExtractor::Extract(const File *pf)
info.signature = utf::Mutf8AsCString(pf->GetStringData(ref_type).data);
}
}
} else {
info.name = utf::Mutf8AsCString(pf->GetStringData(param_id).data);
// get signature of <any> type
info.signature = Type::GetSignatureByTypeId(Type(Type::TypeId::TAGGED));
}
}
first_param = false;
param_info.emplace_back(info);