[PATCH] Accept %k format specifier

Jonathan Schleifer js at webkeks.org
Sat Nov 23 13:15:55 PST 2013


Am 23.11.2013 um 21:15 schrieb David Majnemer <david.majnemer at gmail.com>:

> I see no tests in your patch, please add a test.

Ok, will add one.

> Also, you seem to allow %k/%K in any context, not just ones where ObjCRuntime::getKind() == ObjFW.  Please fix this.

This is intentional! ObjFW is by no means limited to the ObjFW runtime, you can use it perfectly fine with the Apple runtime. This is also not limited to ObjC, as in .c files you can also use function like of_asprintf which accept these format specifiers. So while it might be debatable whether to limit it to ObjC files, limiting it to only the ObjFW runtime will result in code that compiles when using ObjFW with the ObjFW runtime, but is rejected by Clang with -Werror with the Apple runtime.

--
Jonathan



More information about the cfe-commits mailing list