commit | 16e44efe39e2f7f4ea4bde333b53cc9fb6fc2592 | [log] [tgz] |
---|---|---|
author | Alexander Shaposhnikov <shal1t712@gmail.com> | Fri Sep 22 18:36:06 2017 +0000 |
committer | Alex Lorenz <arphaman@gmail.com> | Tue Nov 07 14:49:29 2017 -0800 |
tree | a8450691a60530fabd6dd9bd08cb8cc28b7c4a84 | |
parent | 4cc58d4b61b71d1713029402e075a829b2a5637a [diff] |
[clang] Fix printf fixit for objc specific types For the triple thumbv7-apple-ios8.0.0 ssize_t is long and size_t is unsigned long, while NSInteger is int and NSUinteger is unsigned int. Following https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html Clang catches it and insert a cast to long, for example printf("%zd", getNSInteger()) will be replaced with printf("%zd", (long)getNSInteger()) but since the underlying type of ssize_t is long the specifier "%zd" is not getting replaced. This diff changes this behavior to enable replacing the specifier "%zd" with the correct one. Differential revision: https://reviews.llvm.org/D38159 Test plan: make check-all git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314011 91177308-0d34-0410-b5e6-96231b3b80d8 (cherry picked from commit cc76a8176ee9da9a1c3a5ede43d606b9c727b1ce)