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