Format strings: correct signedness if already correcting width (%d,%u).
authorJordan Rose <jordan_rose@apple.com>
Thu, 17 Jan 2013 18:47:16 +0000 (18:47 +0000)
committerJordan Rose <jordan_rose@apple.com>
Thu, 17 Jan 2013 18:47:16 +0000 (18:47 +0000)
commitaa7a3b3e75e806591f629a4a85155958235625ce
treecb0635422e1003cc7500dca90d4298760564e320
parentb169ccc118f0f9845672272b0668334870b24d07
Format strings: correct signedness if already correcting width (%d,%u).

It is valid to do this:
  printf("%u", (int)x);

But if we see this:
  printf("%lu", (int)x);

...our fixit should suggest %d, not %u.

llvm-svn: 172739
clang/lib/Analysis/PrintfFormatString.cpp
clang/test/FixIt/format-darwin.m
clang/test/FixIt/format.m