]> granicus.if.org Git - clang/commit
Make printf warnings refer to intmax_t et al. by name
authorHans Wennborg <hans@hanshq.net>
Wed, 7 Dec 2011 10:33:11 +0000 (10:33 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 7 Dec 2011 10:33:11 +0000 (10:33 +0000)
commita792aff1c7de253b89c473fdb7eef4a5bba83aec
tree861496c88b07bf5ca7eca8921971bf02e6b7fdb8
parent29f2787b6da552018a7716f18f5bd8f67bd6edb5
Make printf warnings refer to intmax_t et al. by name
in addition to underlying type.

For example, the warning for printf("%zu", 42.0);
changes from "conversion specifies type 'unsigned long'" to "conversion
specifies type 'size_t' (aka 'unsigned long')"

(This is a second attempt after r145697, which got reverted.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146032 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Analysis/Analyses/FormatString.h
lib/Analysis/FormatString.cpp
lib/Analysis/PrintfFormatString.cpp
lib/Sema/SemaChecking.cpp
test/Sema/format-strings-int-typedefs.c [new file with mode: 0644]
test/Sema/format-strings-size_t.c