This is an archive of the discontinued LLVM Phabricator instance.

[clang] Fix handling of "%zd" format specifier
ClosedPublic

Authored by alexander-shaposhnikov on Jul 14 2017, 11:13 AM.

Details

Summary

This diff addresses FIXME in lib/Analysis/PrintfFormatString.cpp
and makes Clang warn on incorrect using of "%zd" format specifier.

Test plan: make check-all

Diff Detail

Repository
rL LLVM

Event Timeline

aaron.ballman added a subscriber: aaron.ballman.
aaron.ballman added inline comments.
lib/Analysis/PrintfFormatString.cpp
539 ↗(On Diff #106672)

What about here?

alexander-shaposhnikov marked an inline comment as done.Jul 14 2017, 1:06 PM
This revision is now accepted and ready to land.Jul 14 2017, 2:23 PM
This revision was automatically updated to reflect the committed changes.
chapuni added inline comments.
cfe/trunk/test/FixIt/format.m
240

The warning wasn't emitted since ssize_t is int for targeting i686.
Tweaked in rL308084.

File clang/test/FixIt/format.m Line 240: format specifies type 'ssize_t *' (aka 'int *') but the argument has type 'short *'
hans added a subscriber: hans.Jul 21 2017, 2:46 AM

Thanks for fixing this long-standing TODO :-)