25 lines · c
1// Check UNIX conformance for cc/c89/c992// When c99 encounters a compilation error that causes an object file not to be3// created, it shall write a diagnostic to standard error and continue to4// compile other source code operands, but it shall not perform the link phase5// and it shall return a non-zero exit status.6 7// When given multiple .c files to compile, clang compiles them in order until8// it hits an error, at which point it stops.9//10// RUN: rm -rf %t-dir11// RUN: mkdir -p %t-dir12// RUN: cd %t-dir13//14// RUN: touch %t-dir/1.c15// RUN: echo "invalid C code" > %t-dir/2.c16// RUN: touch %t-dir/3.c17// RUN: echo "invalid C code" > %t-dir/4.c18// RUN: touch %t-dir/5.c19// RUN: not %clang -S %t-dir/1.c %t-dir/2.c %t-dir/3.c %t-dir/4.c %t-dir/5.c20// RUN: test -f %t-dir/1.s21// RUN: test ! -f %t-dir/2.s22// RUN: test -f %t-dir/3.s23// RUN: test ! -f %t-dir/4.s24// RUN: test -f %t-dir/5.s25