[cfe-commits] r142348 - /cfe/trunk/test/Sema/format-strings-fixit.c

Hans Wennborg hans at hanshq.net
Tue Oct 18 02:30:37 PDT 2011


Author: hans
Date: Tue Oct 18 04:30:37 2011
New Revision: 142348

URL: http://llvm.org/viewvc/llvm-project?rev=142348&view=rev
Log:
Another attempt at fixing format-strings-fixit.c.

Use "%f" as format string to make sure it doesn't match size_t, etc.
whatever they might be typedeffed to, so that the fixit always applies.

Modified:
    cfe/trunk/test/Sema/format-strings-fixit.c

Modified: cfe/trunk/test/Sema/format-strings-fixit.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/format-strings-fixit.c?rev=142348&r1=142347&r2=142348&view=diff
==============================================================================
--- cfe/trunk/test/Sema/format-strings-fixit.c (original)
+++ cfe/trunk/test/Sema/format-strings-fixit.c Tue Oct 18 04:30:37 2011
@@ -54,11 +54,11 @@
   typedef __PTRDIFF_TYPE__ ptrdiff_t;
 
   // size_t, etc.
-  printf("%c", (size_t) 42);
-  //printf("%c", (ssize_t) 42);
-  printf("%c", (intmax_t) 42);
-  printf("%c", (uintmax_t) 42);
-  printf("%c", (ptrdiff_t) 42);
+  printf("%f", (size_t) 42);
+  //printf("%f", (ssize_t) 42);
+  printf("%f", (intmax_t) 42);
+  printf("%f", (uintmax_t) 42);
+  printf("%f", (ptrdiff_t) 42);
 }
 
 // Validate the fixes...





More information about the cfe-commits mailing list