HomePhabricator

Only convert objc messages to alloc to objc_alloc if the receiver is a class.

Description

Only convert objc messages to alloc to objc_alloc if the receiver is a class.

r348687 converted [Foo alloc] to objc_alloc(Foo). However the objc runtime method only takes a Class, not an arbitrary pointer.

This makes sure we are messaging a class before we convert these messages.

rdar://problem/46943703

Details

Committed
peteJan 2 2019, 9:25 AM
Branches
Unknown
Tags
Unknown