Skip to content

Commit 799bf36

Browse files
committed
[Demangling] Fix demangling of built generics to be more robust.
The type being rebuilt might not have any children. rdar://91831405
1 parent 8e926f8 commit 799bf36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Demangling/OldDemangler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,8 @@ class OldDemangler {
10441044
// had its generic arguments applied.
10451045
NodePointer result = Factory.createNode(nominalType->getKind());
10461046
result->addChild(parentOrModule, Factory);
1047-
result->addChild(nominalType->getChild(1), Factory);
1047+
for (unsigned ndx = 1; ndx < nominalType->getNumChildren(); ++ndx)
1048+
result->addChild(nominalType->getChild(ndx), Factory);
10481049

10491050
nominalType = result;
10501051
}

0 commit comments

Comments
 (0)