format_arg attribute does not support nullable instancetype return type
* The format_arg attribute tells the compiler that the attributed function
returns a format string that is compatible with a format string that is being
passed as a specific argument.
* Several NSString methods return copies of their input, so they would ideally
have the format_arg attribute. A previous differential (
D112670) added
support for instancetype methods having the format_arg attribute when used
in the context of NSString method declarations.
*
D112670 failed to account that instancetype can be sugared in certain narrow
(but critical) scenarios, like by using nullability specifiers. This patch
resolves this problem.
Differential Revision: https://reviews.llvm.org/
D113636
Reviewed By: ahatanak
Radar-Id: rdar://
85278860