[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Sema / format-strings-fixit-ssize_t.c
blob2c83db0b663629214e8b880cd55d3b6ad7b68b14
1 // RUN: cp %s %t
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c99 -pedantic -Wall -fixit %t
3 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c99 -fsyntax-only -pedantic -Wall -Werror %t
4 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c99 -E -o - %t | FileCheck %s
6 /* This is a test of the various code modification hints that are
7 provided as part of warning or extension diagnostics. All of the
8 warnings will be fixed by -fixit, and the resulting file should
9 compile cleanly with -Werror -pedantic. */
11 int printf(char const *, ...);
12 int scanf(const char *, ...);
14 void test(void) {
15 typedef signed long int ssize_t;
16 printf("%f", (ssize_t) 42);
17 ssize_t s;
18 scanf("%f", &s);
21 // CHECK: printf("%zd", (ssize_t) 42);
22 // CHECK: scanf("%zd", &s)