[PATCH] D42933: [Sema] Avoid -Wformat warning for NSInteger/NSUInteger 'int' values with %zu/%zi long specifiers

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 5 16:00:19 PST 2018


smeenai added subscribers: compnerd, smeenai.
smeenai added a comment.

This seems ... suboptimal. It breaks existing code in the sense that their code was already broken, and the compiler is just diagnosing it correctly now. Note that Apple themselves recommend casting and using a proper printf specifier: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html (under Platform Dependencies).


Repository:
  rC Clang

https://reviews.llvm.org/D42933





More information about the cfe-commits mailing list