2 // RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -fsyntax-only -Wformat-pedantic -fixit %t
3 // RUN: grep -v CHECK %t | FileCheck %s
5 int printf(const char * restrict, ...);
6 typedef unsigned int NSUInteger;
8 NSUInteger getNSUInteger(void);
9 NSInteger getNSInteger(void);
12 // For thumbv7-apple-ios8.0.0 the underlying type of ssize_t is long
13 // and the underlying type of size_t is unsigned long.
15 printf("test 1: %zu", getNSUInteger());
16 // CHECK: printf("test 1: %lu", (unsigned long)getNSUInteger());
18 printf("test 2: %zu %zu", getNSUInteger(), getNSUInteger());
19 // CHECK: printf("test 2: %lu %lu", (unsigned long)getNSUInteger(), (unsigned long)getNSUInteger());
21 printf("test 3: %zd", getNSInteger());
22 // CHECK: printf("test 3: %ld", (long)getNSInteger());
24 printf("test 4: %zd %zd", getNSInteger(), getNSInteger());
25 // CHECK: printf("test 4: %ld %ld", (long)getNSInteger(), (long)getNSInteger());