[cfe-commits] [Patch] -Wformat fix-its: preserve original conversion specifiers (PR11975)
kremenek at apple.com
Tue Feb 14 13:49:30 PST 2012
Looks great to me.
On Feb 14, 2012, at 7:43 AM, Hans Wennborg <hans at chromium.org> wrote:
> Hi all,
> The attached patch makes PrintfSpecifier::fixType() and
> ScanfSpecifier::fixType() only fix the conversion specification enough
> that Clang wouldn't warn about it, as opposed to always changing it to
> use the "canonical" conversion specifier. (PR11975)
> This preserves the user's choice of conversion specifier in cases like:
> printf("%a", (long double)1); where we previously suggested "%Lf", we
> now suggest "%La"
> printf("%x", (long)1); where we previously suggested "%ld", we now
> suggest "%lx".
> Please take a look.
More information about the cfe-commits