]> granicus.if.org Git - clang/commit
[clang] Fix handling of "%zd" in scanf
authorAlexander Shaposhnikov <shal1t712@gmail.com>
Thu, 20 Jul 2017 20:11:47 +0000 (20:11 +0000)
committerAlexander Shaposhnikov <shal1t712@gmail.com>
Thu, 20 Jul 2017 20:11:47 +0000 (20:11 +0000)
commit26bc81978dda48df0a850c02dffd7a506dc3fdea
tree586b37e1fa49d46956874c9aad60f59b37c0bb8e
parent20dd3343d9d7669afbb0083b6385cb024bf40f21
[clang] Fix handling of "%zd" in scanf

This diff addresses FIXMEs in lib/Analysis/ScanfFormatString.cpp
for the case of ssize_t format specifier and adds tests.
In particular, this change enables Clang to emit a warning
on incorrect using of "%zd"/"%zn".

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D35652

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308662 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScanfFormatString.cpp
test/Sema/format-strings-fixit-ssize_t.c
test/Sema/format-strings-scanf.c