1 // RUN: rm -rf %t
2 // RUN: mkdir %t
3 // RUN: not env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 %clang -fsyntax-only %s \
4 // RUN:  -F/tmp/ -I /tmp/ -idirafter /tmp/ -iquote /tmp/ -isystem /tmp/ \
5 // RUN:  -iprefix /the/prefix -iwithprefix /tmp -iwithprefixbefore /tmp/ \
6 // RUN:  -Xclang -internal-isystem -Xclang /tmp/                         \
7 // RUN:  -Xclang -internal-externc-isystem -Xclang /tmp/                 \
8 // RUN:  -DFOO=BAR 2>&1 | FileCheck %s
9 // RUN: cat %t/crash-report-*.c | FileCheck --check-prefix=CHECKSRC %s
10 // RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s
11 // REQUIRES: crash-recovery
12 
13 // because of the glob (*.c, *.sh)
14 // REQUIRES: shell
15 
16 // RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null 2>&1 | FileCheck %s
17 
18 // FIXME: Investigating. "fatal error: file 'nul' modified since it was first processed"
19 // XFAIL: mingw32
20 
21 #pragma clang __debug parser_crash
22 // CHECK: Preprocessed source(s) and associated run script(s) are located at:
23 // CHECK-NEXT: note: diagnostic msg: {{.*}}.c
24 FOO
25 // CHECKSRC: FOO
26 // CHECKSH: -cc1
27 // CHECKSH: -D "FOO=BAR"
28 // CHECKSH-NOT: -F/tmp/
29 // CHECKSH-NOT: -I /tmp/
30 // CHECKSH-NOT: -idirafter /tmp/
31 // CHECKSH-NOT: -iquote /tmp/
32 // CHECKSH-NOT: -isystem /tmp/
33 // CHECKSH-NOT: -iprefix /the/prefix
34 // CHECKSH-NOT: -iwithprefix /tmp/
35 // CHECKSH-NOT: -iwithprefixbefore /tmp/
36 // CHECKSH-NOT: -internal-isystem /tmp/
37 // CHECKSH-NOT: -internal-externc-isystem /tmp/
38 // CHECKSH-NOT: -dwarf-debug-flags
39