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