crash-report.c revision 699c6cd0b99f715b6638c8d49f1dfee22f30aabe
1// RUN: rm -rf %t
2// RUN: mkdir %t
3// RUN: env TMPDIR=%t TEMP=%t TMP=%t %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:  -internal-isystem /tmp/ -internal-externc-isystem /tmp/ \
7// RUN:  -DFOO=BAR 2>&1 | FileCheck %s
8// RUN: cat %t/crash-report-*.c | FileCheck --check-prefix=CHECKSRC %s
9// RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s
10// REQUIRES: crash-recovery
11
12#pragma clang __debug parser_crash
13// CHECK: Preprocessed source(s) and associated run script(s) are located at:
14// CHECK-NEXT: note: diagnostic msg: {{.*}}.c
15FOO
16// CHECKSRC: FOO
17// CHECKSH: -D "FOO=BAR"
18// CHECKSH-NOT: -F/tmp/
19// CHECKSH-NOT: -I /tmp/
20// CHECKSH-NOT: -idirafter /tmp/
21// CHECKSH-NOT: -iquote /tmp/
22// CHECKSH-NOT: -isystem /tmp/
23// CHECKSH-NOT: -iprefix /the/prefix
24// CHECKSH-NOT: -iwithprefix /tmp/
25// CHECKSH-NOT: -iwithprefixbefore /tmp/
26// CHECKSH-NOT: -internal-isystem /tmp/
27// CHECKSH-NOT: -internal-externc-isystem /tmp/
28