2012-07-17 13:09:20 +08:00
|
|
|
// RUN: rm -rf %t
|
|
|
|
// RUN: mkdir %t
|
2013-07-05 00:16:58 +08:00
|
|
|
// RUN: not env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 %clang -fsyntax-only %s \
|
2012-07-26 02:38:57 +08:00
|
|
|
// RUN: -F/tmp/ -I /tmp/ -idirafter /tmp/ -iquote /tmp/ -isystem /tmp/ \
|
|
|
|
// RUN: -iprefix /the/prefix -iwithprefix /tmp -iwithprefixbefore /tmp/ \
|
2013-09-25 23:47:05 +08:00
|
|
|
// RUN: -Xclang -internal-isystem -Xclang /tmp/ \
|
|
|
|
// RUN: -Xclang -internal-externc-isystem -Xclang /tmp/ \
|
2012-07-26 02:38:57 +08:00
|
|
|
// RUN: -DFOO=BAR 2>&1 | FileCheck %s
|
2014-06-24 16:01:01 +08:00
|
|
|
// RUN: cat %t/crash-report-*.c | FileCheck --check-prefix=CHECKSRC %s
|
2012-07-17 13:09:20 +08:00
|
|
|
// RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s
|
2012-06-30 06:03:56 +08:00
|
|
|
// REQUIRES: crash-recovery
|
|
|
|
|
2014-06-24 16:01:01 +08:00
|
|
|
// because of the glob (*.c, *.sh)
|
2013-07-05 00:23:44 +08:00
|
|
|
// REQUIRES: shell
|
|
|
|
|
2012-06-30 06:03:56 +08:00
|
|
|
#pragma clang __debug parser_crash
|
|
|
|
// CHECK: Preprocessed source(s) and associated run script(s) are located at:
|
2014-10-21 13:13:09 +08:00
|
|
|
// CHECK-NEXT: note: diagnostic msg: {{.*}}crash-report-{{.*}}.c
|
2012-07-03 06:07:20 +08:00
|
|
|
FOO
|
|
|
|
// CHECKSRC: FOO
|
2015-03-12 08:14:35 +08:00
|
|
|
// CHECKSH: # Crash reproducer
|
|
|
|
// CHECKSH-NEXT: # Original command: {{.*$}}
|
|
|
|
// CHECKSH-NEXT: "-cc1"
|
2014-10-22 02:03:08 +08:00
|
|
|
// CHECKSH: "-main-file-name" "crash-report.c"
|
|
|
|
// CHECKSH: "-D" "FOO=BAR"
|
|
|
|
// CHECKSH-NOT: "-F/tmp/"
|
|
|
|
// CHECKSH-NOT: "-I" "/tmp/"
|
|
|
|
// CHECKSH-NOT: "-idirafter" "/tmp/"
|
|
|
|
// CHECKSH-NOT: "-iquote" "/tmp/"
|
|
|
|
// CHECKSH-NOT: "-isystem" "/tmp/"
|
|
|
|
// CHECKSH-NOT: "-iprefix" "/the/prefix"
|
|
|
|
// CHECKSH-NOT: "-iwithprefix" "/tmp/"
|
|
|
|
// CHECKSH-NOT: "-iwithprefixbefore" "/tmp/"
|
|
|
|
// CHECKSH-NOT: "-internal-isystem" "/tmp/"
|
|
|
|
// CHECKSH-NOT: "-internal-externc-isystem" "/tmp/"
|
|
|
|
// CHECKSH-NOT: "-dwarf-debug-flags"
|
|
|
|
// CHECKSH: "crash-report-{{[^ ]*}}.c"
|