brintos

brintos / llvm-project-archived public Read only

0
0
Text · 966 B · 3db75df Raw
27 lines · plain
1// RUN: cp %s %t2// RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -Wformat-pedantic -fixit %t3// RUN: grep -v CHECK %t | FileCheck %s4 5int printf(const char * restrict, ...);6typedef unsigned int NSUInteger;7typedef int NSInteger;8NSUInteger getNSUInteger(void);9NSInteger getNSInteger(void);10 11void test(void) {12  // For thumbv7-apple-ios8.0.0 the underlying type of ssize_t is long13  // 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