Debian Codegraph @

clang/test/Driver/crash-report-modules.m

raw
1 // RUN: rm -rf %t/crmdir
2 // RUN: mkdir -p %t/crmdir/i %t/crmdir/m
3
4 // RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t/crmdir TEMP=%t/crmdir TMP=%t/crmdir \
5 // RUN: not %clang -fsyntax-only %s -I %S/Inputs/module -isysroot %/t/i/ \
6 // RUN: -fmodules -fmodules-cache-path=%t/crmdir/m/ -DFOO=BAR 2>&1 | FileCheck %s
7
8 // RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crmdir/crash-report-*.m
9 // RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crmdir/crash-report-*.sh
10 // REQUIRES: crash-recovery
11
12 // FIXME: This test creates excessively deep directory hierarchies that cause
13 // problems on Windows.
14 // UNSUPPORTED: system-windows
15
16 @import simple;
17 const int x = MODULE_MACRO;
18
19 // CHECK: PLEASE submit a bug report to {{.*}} and include the crash backtrace, preprocessed source, and associated run script.
20 // CHECK: Preprocessed source(s) and associated run script(s) are located at:
21 // CHECK-NEXT: note: diagnostic msg: {{.*}}.m
22 // CHECK-NEXT: note: diagnostic msg: {{.*}}.cache
23
24 // CHECKSRC: @import simple;
25 // CHECKSRC: const int x = 10;
26
27 // CHECKSH: # Crash reproducer
28 // CHECKSH-NEXT: # Driver args: "-fsyntax-only"
29 // CHECKSH-SAME: "-D" "FOO=BAR"
30 // CHECKSH-NEXT: # Original command: {{.*$}}
31 // CHECKSH-NEXT: "-cc1"
32 // CHECKSH: "-isysroot" "{{[^"]*}}/i/"
33 // CHECKSH: "-D" "FOO=BAR"
34 // CHECKSH-NOT: "-fmodules-cache-path="
35 // CHECKSH: "crash-report-modules-{{[^ ]*}}.m"
36 // CHECKSH: "-ivfsoverlay" "crash-report-modules-{{[^ ]*}}.cache{{(/|\\\\)}}vfs{{(/|\\\\)}}vfs.yaml"