]> granicus.if.org Git - clang/commit
Teach format string analysis that "%zu" means size_t.
authorHans Wennborg <hans@hanshq.net>
Thu, 27 Oct 2011 08:29:09 +0000 (08:29 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 27 Oct 2011 08:29:09 +0000 (08:29 +0000)
commit29e97cb35fab314388f62b68fefa78947e93c1dc
treeef30883ed59f503100b456acf04d5f319e176cea
parent98a9203d80b6a5ff90edf037b1595f553fc81b15
Teach format string analysis that "%zu" means size_t.

The code had it backwards, thinking size_t was signed, and using that for "%zd".

Also let the analysis get the types for (u)intmax_t while we are at it.

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