brintos

brintos / llvm-project-archived public Read only

0
0
Text · 767 B · 9680651 Raw
23 lines · c
1// RUN: cp %s %t2// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c99 -pedantic -Wall -fixit %t3// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c99 -fsyntax-only -pedantic -Wall -Werror %t4// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c99 -E -o - %t | FileCheck %s5 6/* This is a test of the various code modification hints that are7   provided as part of warning or extension diagnostics. All of the8   warnings will be fixed by -fixit, and the resulting file should9   compile cleanly with -Werror -pedantic. */10 11int printf(char const *, ...);12int scanf(const char *, ...);13 14typedef long ssize_t;15void test(void) {16  printf("%f", (ssize_t) 42);17  ssize_t s;18  scanf("%f",  &s);19}20 21// CHECK: printf("%zd", (ssize_t) 42);22// CHECK: scanf("%zd", &s)23