2012-07-17 13:09:20 +08:00
|
|
|
// RUN: rm -rf %t
|
|
|
|
// RUN: mkdir %t
|
2015-08-06 07:49:44 +08:00
|
|
|
// RUN: not env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 \
|
|
|
|
// RUN: CC_PRINT_HEADERS=1 CC_LOG_DIAGNOSTICS=1 \
|
|
|
|
// RUN: %clang -fsyntax-only %s \
|
|
|
|
// RUN: -F/tmp/ -I /tmp/ -idirafter /tmp/ -iquote /tmp/ -isystem /tmp/ \
|
2012-07-26 02:38:57 +08:00
|
|
|
// 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/ \
|
2015-07-17 11:35:54 +08:00
|
|
|
// RUN: -Xclang -main-file-name -Xclang foo.c \
|
2015-07-09 14:58:31 +08:00
|
|
|
// RUN: -DFOO=BAR -DBAR="BAZ QUX" 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
|
|
|
|
|
2015-07-26 12:59:52 +08:00
|
|
|
// because of the glob (*.c, *.sh)
|
|
|
|
// 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
|
2015-07-09 14:58:31 +08:00
|
|
|
// CHECKSH-NEXT: # Driver args: "-fsyntax-only"
|
|
|
|
// CHECKSH-SAME: "-D" "FOO=BAR"
|
|
|
|
// CHECKSH-SAME: "-D" "BAR=BAZ QUX"
|
2015-03-12 08:14:35 +08:00
|
|
|
// CHECKSH-NEXT: # Original command: {{.*$}}
|
|
|
|
// CHECKSH-NEXT: "-cc1"
|
2014-10-22 02:03:08 +08:00
|
|
|
// CHECKSH: "-main-file-name" "crash-report.c"
|
2015-08-06 07:49:44 +08:00
|
|
|
// CHECKSH-NOT: "-header-include-file"
|
|
|
|
// CHECKSH-NOT: "-diagnostic-log-file"
|
2014-10-22 02:03:08 +08:00
|
|
|
// CHECKSH: "-D" "FOO=BAR"
|
2015-07-09 14:58:31 +08:00
|
|
|
// CHECKSH: "-D" "BAR=BAZ QUX"
|
2014-10-22 02:03:08 +08:00
|
|
|
// 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"
|