[cfe-commits] r145697 - in /cfe/trunk: 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

Joerg Sonnenberger joerg at britannica.bec.de
Sat Dec 3 13:37:17 PST 2011


On Sat, Dec 03, 2011 at 10:14:24AM -0800, Douglas Gregor wrote:
> The warning does need to find the typedef, because it shouldn't suggest
> 'size_t' if no 'size_t' is visible. However, you can just perform
> lookup into the translation unit (using DeclContext's lookup) to find
> an appropriately-typed 'size_t' typedef.

I disagree on this. %zu should *always* suggest size_t, %ju should
*always* suggest uintmax_t etc.

Joerg



More information about the cfe-commits mailing list