Page MenuHomePhabricator

format_arg attribute does not support nullable instancetype return type

Authored by fcloutier on Nov 10 2021, 6:10 PM.



Following up with D112670, it appears that the original fix was insufficient: it's not possible to use __attribute__((format_arg)) on methods that return instancetype in NSString when instancetype is sugared, as this breaks pointer equality. Although this is only possible in limited scenarios because instancetype is a contextual keyword, it can (crucially) be combined with nullability qualifiers.


Diff Detail

Event Timeline

fcloutier created this revision.Nov 10 2021, 6:10 PM
fcloutier requested review of this revision.Nov 10 2021, 6:10 PM
This revision is now accepted and ready to land.Nov 12 2021, 11:54 AM