annotate clang/test/Driver/crash-report.c @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: rm -rf %t
anatofuz
parents:
diff changeset
2 // RUN: mkdir %t
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 // RUN: echo '-fsyntax-only \
anatofuz
parents:
diff changeset
5 // RUN: -F/tmp/ -I /tmp/ -idirafter /tmp/ -iquote /tmp/ -isystem /tmp/ \
anatofuz
parents:
diff changeset
6 // RUN: -iprefix /the/prefix -iwithprefix /tmp -iwithprefixbefore /tmp/ \
anatofuz
parents:
diff changeset
7 // RUN: -Xclang -internal-isystem -Xclang /tmp/ \
anatofuz
parents:
diff changeset
8 // RUN: -Xclang -internal-externc-isystem -Xclang /tmp/ \
anatofuz
parents:
diff changeset
9 // RUN: -Xclang -main-file-name -Xclang foo.c \
anatofuz
parents:
diff changeset
10 // RUN: -DFOO=BAR -DBAR="BAZ QUX"' > %t.rsp
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 // RUN: env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 \
anatofuz
parents:
diff changeset
13 // RUN: CC_PRINT_HEADERS=1 CC_LOG_DIAGNOSTICS=1 \
anatofuz
parents:
diff changeset
14 // RUN: not %clang %s @%t.rsp -DPARSER 2>&1 | FileCheck %s
anatofuz
parents:
diff changeset
15 // RUN: cat %t/crash-report-*.c | FileCheck --check-prefix=CHECKSRC %s
anatofuz
parents:
diff changeset
16 // RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 // RUN: env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 \
anatofuz
parents:
diff changeset
19 // RUN: CC_PRINT_HEADERS=1 CC_LOG_DIAGNOSTICS=1 \
anatofuz
parents:
diff changeset
20 // RUN: not %clang %s @%t.rsp -DCRASH 2>&1 | FileCheck %s
anatofuz
parents:
diff changeset
21 // RUN: cat %t/crash-report-*.c | FileCheck --check-prefix=CHECKSRC %s
anatofuz
parents:
diff changeset
22 // RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s
anatofuz
parents:
diff changeset
23
anatofuz
parents:
diff changeset
24 // RUN: env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 \
anatofuz
parents:
diff changeset
25 // RUN: CC_PRINT_HEADERS=1 CC_LOG_DIAGNOSTICS=1 \
anatofuz
parents:
diff changeset
26 // RUN: not %clang %s @%t.rsp -DFATAL 2>&1 | FileCheck %s
anatofuz
parents:
diff changeset
27 // RUN: cat %t/crash-report-*.c | FileCheck --check-prefix=CHECKSRC %s
anatofuz
parents:
diff changeset
28 // RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s
anatofuz
parents:
diff changeset
29
anatofuz
parents:
diff changeset
30 // REQUIRES: crash-recovery
anatofuz
parents:
diff changeset
31
anatofuz
parents:
diff changeset
32 #ifdef PARSER
anatofuz
parents:
diff changeset
33 #pragma clang __debug parser_crash
anatofuz
parents:
diff changeset
34 #elif CRASH
anatofuz
parents:
diff changeset
35 #pragma clang __debug crash
anatofuz
parents:
diff changeset
36 #elif FATAL
anatofuz
parents:
diff changeset
37 #pragma clang __debug llvm_fatal_error
anatofuz
parents:
diff changeset
38 #endif
anatofuz
parents:
diff changeset
39
anatofuz
parents:
diff changeset
40 // CHECK: Preprocessed source(s) and associated run script(s) are located at:
anatofuz
parents:
diff changeset
41 // CHECK-NEXT: note: diagnostic msg: {{.*}}crash-report-{{.*}}.c
anatofuz
parents:
diff changeset
42 FOO
anatofuz
parents:
diff changeset
43 // CHECKSRC: FOO
anatofuz
parents:
diff changeset
44 // CHECKSH: # Crash reproducer
anatofuz
parents:
diff changeset
45 // CHECKSH-NEXT: # Driver args: {{.*}}"-fsyntax-only"
anatofuz
parents:
diff changeset
46 // CHECKSH-SAME: "-D" "FOO=BAR"
anatofuz
parents:
diff changeset
47 // CHECKSH-SAME: "-D" "BAR=BAZ QUX"
anatofuz
parents:
diff changeset
48 // CHECKSH-NEXT: # Original command: {{.*$}}
anatofuz
parents:
diff changeset
49 // CHECKSH-NEXT: "-cc1"
anatofuz
parents:
diff changeset
50 // CHECKSH: "-main-file-name" "crash-report.c"
anatofuz
parents:
diff changeset
51 // CHECKSH-NOT: "-header-include-file"
anatofuz
parents:
diff changeset
52 // CHECKSH-NOT: "-diagnostic-log-file"
anatofuz
parents:
diff changeset
53 // CHECKSH: "-D" "FOO=BAR"
anatofuz
parents:
diff changeset
54 // CHECKSH: "-D" "BAR=BAZ QUX"
anatofuz
parents:
diff changeset
55 // CHECKSH-NOT: "-F/tmp/"
anatofuz
parents:
diff changeset
56 // CHECKSH-NOT: "-I" "/tmp/"
anatofuz
parents:
diff changeset
57 // CHECKSH-NOT: "-idirafter" "/tmp/"
anatofuz
parents:
diff changeset
58 // CHECKSH-NOT: "-iquote" "/tmp/"
anatofuz
parents:
diff changeset
59 // CHECKSH-NOT: "-isystem" "/tmp/"
anatofuz
parents:
diff changeset
60 // CHECKSH-NOT: "-iprefix" "/the/prefix"
anatofuz
parents:
diff changeset
61 // CHECKSH-NOT: "-iwithprefix" "/tmp/"
anatofuz
parents:
diff changeset
62 // CHECKSH-NOT: "-iwithprefixbefore" "/tmp/"
anatofuz
parents:
diff changeset
63 // CHECKSH-NOT: "-internal-isystem" "/tmp/"
anatofuz
parents:
diff changeset
64 // CHECKSH-NOT: "-internal-externc-isystem" "/tmp/"
anatofuz
parents:
diff changeset
65 // CHECKSH-NOT: "-dwarf-debug-flags"
anatofuz
parents:
diff changeset
66 // CHECKSH: "crash-report-{{[^ ]*}}.c"