Skip to content

Commit bec0dbc

Browse files
committed
Demangling: Assert child count in mangleOpaqueType
1 parent 1700295 commit bec0dbc

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
@@ -3327,6 +3327,7 @@ ManglingError Remangler::mangleOpaqueType(Node *node, unsigned depth) {
33273327
if (trySubstitution(node, entry))
33283328
return ManglingError::Success;
33293329

3330+
DEMANGLER_ASSERT(node->getNumChildren() >= 2, node);
33303331
RETURN_IF_ERROR(mangle(node->getChild(0), depth + 1));
33313332
auto boundGenerics = node->getChild(2);
33323333
for (unsigned i = 0; i < boundGenerics->getNumChildren(); ++i) {

0 commit comments

Comments
 (0)