[PATCH] Accept %k format specifier

Jonathan Schleifer js at webkeks.org
Sun Nov 24 05:38:09 PST 2013


I wrote a new patch now which introduces __attribute__((format(__OFString__, …, …))). When the type is __OFString__, %C and %S are considered to be type of_unichar_t / const of_unichar_t*. %k and %K are completely gone now. This is similar to how %C and %S are treated when the type is __NSString__, where they are treated as unichar / const unichar* then.

Please review the patch as I had to replace a few bools indicating whether the type is an ObjC format by a type so that there is a way to differentiate between __NSString__ and __OFString__. This also means I had to change a few function definitions and declarations.

There are no tests yet, but if this patch is otherwise good, I will add some.

--
Jonathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ofstring_format_string.patch
Type: application/octet-stream
Size: 11609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131124/9e0e896c/attachment.obj>
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131124/9e0e896c/attachment.sig>


More information about the cfe-commits mailing list