Demangling: avoid implicit fallthrough

For non-asserts builds, this would produce the wrong result.  Simply
return from the function instead (as we do in the case where we expect
this to be handled).
This commit is contained in:
Saleem Abdulrasool
2020-11-17 14:30:36 -08:00
parent fe5be6368e
commit b2535b2372

View File

@@ -2145,6 +2145,7 @@ NodePointer NodePrinter::print(NodePointer Node, bool asPrefixContext) {
return nullptr;
case Node::Kind::ImplFunctionConventionName:
assert(false && "Already handled in ImplFunctionConvention");
return nullptr;
case Node::Kind::ImplErrorResult:
Printer << "@error ";
printChildren(Node, " ");