From 3040124b1407a29d75c26415e582479e0e5f4b01 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Wed, 30 Nov 2022 12:44:37 -0800 Subject: [PATCH] Mangling: Add another assert in mangleDependentGenericConformanceRequirement --- lib/Demangling/Remangler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Demangling/Remangler.cpp b/lib/Demangling/Remangler.cpp index c435856432b1d..585c3902fcb8a 100644 --- a/lib/Demangling/Remangler.cpp +++ b/lib/Demangling/Remangler.cpp @@ -980,6 +980,7 @@ Remangler::mangleDependentGenericConformanceRequirement(Node *node, unsigned depth) { DEMANGLER_ASSERT(node->getNumChildren() == 2, node); Node *ProtoOrClass = node->getChild(1); + DEMANGLER_ASSERT(ProtoOrClass->hasChildren(), ProtoOrClass); if (ProtoOrClass->getFirstChild()->getKind() == Node::Kind::Protocol) { RETURN_IF_ERROR(manglePureProtocol(ProtoOrClass, depth + 1)); auto Mangling = mangleConstrainedType(node->getChild(0), depth + 1);