Skip to content

Commit 0bbb270

Browse files
committed
[RemoteInspection] Pass through null returns from TypeRefVisitor.
If `TypeRefVisitor<DemanglingForTypeRef, Demangle,NodePointer>::visit` returns `nullptr`, we should pass it through. The callers of `TypeRef::getDemangling()` are already prepared to cope with `nullptr` returns, so this should be fine and avoids hitting an assertion failure in that case. rdar://120941628
1 parent d0344e5 commit 0bbb270

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/RemoteInspection/TypeRef.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,8 @@ class DemanglingForTypeRef
531531
Demangle::NodePointer visit(const TypeRef *typeRef) {
532532
auto node = TypeRefVisitor<DemanglingForTypeRef,
533533
Demangle::NodePointer>::visit(typeRef);
534+
if (!node)
535+
return nullptr;
534536

535537
// Wrap all nodes in a Type node, as consumers generally expect.
536538
auto typeNode = Dem.createNode(Node::Kind::Type);

0 commit comments

Comments
 (0)