1 // RUN: rm -rf %t 2 // RUN: mkdir -p %t/i %t/m %t 3 4 // RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \ 5 // RUN: %clang -fsyntax-only %s -I %S/Inputs/module -isysroot %/t/i/ \ 6 // RUN: -fmodules -fmodules-cache-path=%t/m/ -DFOO=BAR 2>&1 | FileCheck %s 7 8 // RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-report-*.m 9 // RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-report-*.sh 10 // REQUIRES: crash-recovery 11 12 // because of the glob (*.m, *.sh) 13 // REQUIRES: shell 14 15 // FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it? 16 // XFAIL: mingw32 17 18 @import simple; 19 const int x = MODULE_MACRO; 20 21 // CHECK: Preprocessed source(s) and associated run script(s) are located at: 22 // CHECK-NEXT: note: diagnostic msg: {{.*}}.m 23 // CHECK-NEXT: note: diagnostic msg: {{.*}}.cache 24 25 // CHECKSRC: @import simple; 26 // CHECKSRC: const int x = 10; 27 28 // CHECKSH: # Crash reproducer 29 // CHECKSH-NEXT: # Driver args: "-fsyntax-only" 30 // CHECKSH-SAME: "-D" "FOO=BAR" 31 // CHECKSH-NEXT: # Original command: {{.*$}} 32 // CHECKSH-NEXT: "-cc1" 33 // CHECKSH: "-isysroot" "{{[^"]*}}/i/" 34 // CHECKSH: "-D" "FOO=BAR" 35 // CHECKSH-NOT: "-fmodules-cache-path=" 36 // CHECKSH: "crash-report-modules-{{[^ ]*}}.m" 37 // CHECKSH: "-ivfsoverlay" "crash-report-modules-{{[^ ]*}}.cache/vfs/vfs.yaml" 38