swift
dfea1630 - [Demangler] Fix assertion failure.

Commit
1 year ago
[Demangler] Fix assertion failure. It's illegal to call `node->addChild()` with a `NULL` child argument; it's possible to construct unexpected `Node` trees by passing invalid manglings, and in this case that was causing `popTypeAndGetChild()` to fail (because the top node was not a `Type` node), which then meant that the call to `addChild` had a `NULL` child argument. The simplest fix is to use `createWithChildren()` to do the node construction, because that function checks its arguments for `NULL`s. rdar://125350219
Author
Parents
Loading