In a class method, 'self' points to the class object, so it should be safe to pass it to objc_alloc. Also, convert '[[self alloc] init]' in a class method to 'objc_alloc_init(self)'.
rdar://problem/50855121
In a class method, 'self' points to the class object, so it should be safe to pass it to objc_alloc. Also, convert '[[self alloc] init]' in a class method to 'objc_alloc_init(self)'.
rdar://problem/50855121
lib/CodeGen/CGObjC.cpp | ||
---|---|---|
376 ↗ | (On Diff #202113) | I think it's fine to just call this a class message, unless I'm missing a reason to distinguish them in this function. |
Just set isClassMessage instead of passing a separate flag to tryGenerateSpecializedMessageSend.