1// RUN: cp %s %t
2// RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -fsyntax-only -Wformat-pedantic -fixit %t
3// RUN: grep -v CHECK %t | FileCheck %s
4
5int printf(const char * restrict, ...);
6typedef unsigned int NSUInteger;
7typedef int NSInteger;
8NSUInteger getNSUInteger();
9NSInteger getNSInteger();
10
11void test() {
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.
14
15  printf("test 1: %zu", getNSUInteger());
16  // CHECK: printf("test 1: %lu", (unsigned long)getNSUInteger());
17
18  printf("test 2: %zu %zu", getNSUInteger(), getNSUInteger());
19  // CHECK: printf("test 2: %lu %lu", (unsigned long)getNSUInteger(), (unsigned long)getNSUInteger());
20
21  printf("test 3: %zd", getNSInteger());
22  // CHECK: printf("test 3: %ld", (long)getNSInteger());
23
24  printf("test 4: %zd %zd", getNSInteger(), getNSInteger());
25  // CHECK: printf("test 4: %ld %ld", (long)getNSInteger(), (long)getNSInteger());
26}
27