1 // Check UNIX conformance for cc/c89/c99
2 // When c99 encounters a compilation error that causes an object file not to be
3 // created, it shall write a diagnostic to standard error and continue to
4 // compile other source code operands, but it shall not perform the link phase
5 // and it shall return a non-zero exit status.
6 
7 // When given multiple .c files to compile, clang compiles them in order until
8 // it hits an error, at which point it stops.
9 //
10 // RUN: rm -rf %t-dir
11 // RUN: mkdir -p %t-dir
12 // RUN: cd %t-dir
13 //
14 // RUN: touch %t-dir/1.c
15 // RUN: echo "invalid C code" > %t-dir/2.c
16 // RUN: touch %t-dir/3.c
17 // RUN: echo "invalid C code" > %t-dir/4.c
18 // RUN: touch %t-dir/5.c
19 // RUN: not %clang -S %t-dir/1.c %t-dir/2.c %t-dir/3.c %t-dir/4.c %t-dir/5.c
20 // RUN: test -f %t-dir/1.s
21 // RUN: test ! -f %t-dir/2.s
22 // RUN: test -f %t-dir/3.s
23 // RUN: test ! -f %t-dir/4.s
24 // RUN: test -f %t-dir/5.s
25