Type chooser: fix composite type changes (struct, pointer, array modifiers)

This commit is contained in:
ichooseu
2026-02-13 07:30:40 -07:00
committed by sysadmin
parent c86a6dbc73
commit ffde3343dd
4 changed files with 260 additions and 0 deletions

View File

@@ -366,6 +366,10 @@ struct NodeTree {
if (end > maxEnd) maxEnd = end;
}
// Embedded struct reference: no own children but refId points to a struct definition
if (kids.isEmpty() && node.kind == NodeKind::Struct && node.refId != 0)
maxEnd = qMax(maxEnd, structSpan(node.refId, childMap, visited));
return qMax(declaredSize, maxEnd);
}