diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-01-17 22:34:10 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-01-17 22:34:10 +0000 |
commit | cdbe1e0d85d7d32452dd1c52758d7bfaa1c0663b (patch) | |
tree | ff971142e79d16f5b8d2fc7b78d5f227e1581373 /test/Sema/format-strings-fixit.c | |
parent | de03c15ad92b44a4be11507ca2501bb9dd014dce (diff) |
Format strings: don't ever convert %+d to %lu.
Presumably, if the printf format has the sign explicitly requested, the user
wants to treat the data as signed.
This is a fix-up for r172739, and also includes several test changes that
didn't make it into that commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings-fixit.c')
-rw-r--r-- | test/Sema/format-strings-fixit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/Sema/format-strings-fixit.c b/test/Sema/format-strings-fixit.c index 15ac713428..31274185cb 100644 --- a/test/Sema/format-strings-fixit.c +++ b/test/Sema/format-strings-fixit.c @@ -165,7 +165,7 @@ void test2() { // Validate the fixes. // CHECK: printf("%d", (int) 123); // CHECK: printf("abc%s", "testing testing 123"); -// CHECK: printf("%lu", (long) -12); +// CHECK: printf("%ld", (long) -12); // CHECK: printf("%d", 123); // CHECK: printf("%s\n", "x"); // CHECK: printf("%f\n", 1.23); @@ -193,11 +193,11 @@ void test2() { // CHECK: printf("%d", (my_int_type) 42); // CHECK: printf("%s", "foo"); // CHECK: printf("%lo", (long) 42); -// CHECK: printf("%lu", (long) 42); +// CHECK: printf("%ld", (long) 42); // CHECK: printf("%lx", (long) 42); // CHECK: printf("%lX", (long) 42); -// CHECK: printf("%li", (unsigned long) 42); -// CHECK: printf("%ld", (unsigned long) 42); +// CHECK: printf("%lu", (unsigned long) 42); +// CHECK: printf("%lu", (unsigned long) 42); // CHECK: printf("%LF", (long double) 42); // CHECK: printf("%Le", (long double) 42); // CHECK: printf("%LE", (long double) 42); |