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 | 1eb342920b33cda278a913435daad6e1dece6396 (patch) | |
tree | 83a69f2afc9801984af74d5159d0f7502b18c4af /clang/test/Sema/format-strings-fixit.c | |
parent | 0015f0987792014c9f9daf595c8f4594cb465213 (diff) | |
download | bcm5719-llvm-1eb342920b33cda278a913435daad6e1dece6396.tar.gz bcm5719-llvm-1eb342920b33cda278a913435daad6e1dece6396.zip |
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.
llvm-svn: 172762
Diffstat (limited to 'clang/test/Sema/format-strings-fixit.c')
-rw-r--r-- | clang/test/Sema/format-strings-fixit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/Sema/format-strings-fixit.c b/clang/test/Sema/format-strings-fixit.c index 15ac7134287..31274185cbc 100644 --- a/clang/test/Sema/format-strings-fixit.c +++ b/clang/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); |