[PATCH] D35427: [clang] Fix handling of "%zd" format specifier

NAKAMURA Takumi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 14 23:18:45 PDT 2017


chapuni added inline comments.


================
Comment at: cfe/trunk/test/FixIt/format.m:240
+  int x;
+  printf("%zn", &x); // expected-warning{{format specifies type 'ssize_t *' (aka 'long *') but the argument has type 'int *'}}
+  // PrintfSpecifier::fixType doesn't handle %n, so a fix-it is not emitted, 
----------------
The warning wasn't emitted since ssize_t is int for targeting i686.
Tweaked in rL308084.

  File clang/test/FixIt/format.m Line 240: format specifies type 'ssize_t *' (aka 'int *') but the argument has type 'short *'



Repository:
  rL LLVM

https://reviews.llvm.org/D35427





More information about the cfe-commits mailing list