Skip to content

Commit b2a49c6

Browse files
authored
Mangling: Add child count assert to mangleOpaqueType (swiftlang#62035)
rdar://102151737
1 parent 31af288 commit b2a49c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Demangling/Remangler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3376,6 +3376,7 @@ ManglingError Remangler::mangleOpaqueType(Node *node, unsigned depth) {
33763376
if (trySubstitution(node, entry))
33773377
return ManglingError::Success;
33783378

3379+
DEMANGLER_ASSERT(node->getNumChildren() >= 3, node);
33793380
RETURN_IF_ERROR(mangle(node->getChild(0), depth + 1));
33803381
auto boundGenerics = node->getChild(2);
33813382
for (unsigned i = 0; i < boundGenerics->getNumChildren(); ++i) {

0 commit comments

Comments
 (0)