36 lines · plain
1// REQUIRES: crash-recovery, system-darwin2// RUN: rm -rf %t3// RUN: mkdir -p %t/i %t/m %t4 5// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \6// RUN: not %clang -fsyntax-only %s \7// RUN: -I %S/Inputs/module -isysroot %/t/i/ \8// RUN: -fmodules -fmodules-cache-path=%t/m/ -DFOO=BAR 2>&1 | \9// RUN: FileCheck -check-prefix=CRASH_ENV %s10 11// RUN: env TMPDIR=%t TEMP=%t TMP=%t \12// RUN: not %clang -gen-reproducer -fsyntax-only %s \13// RUN: -I %S/Inputs/module -isysroot %/t/i/ \14// RUN: -fmodules -fmodules-cache-path=%t/m/ -DFOO=BAR 2>&1 | \15// RUN: FileCheck -check-prefix=CRASH_FLAG %s16 17@import simple;18const int x = MODULE_MACRO;19 20// CRASH_ENV: PLEASE submit a bug report to {{.*}} and include the crash backtrace, preprocessed source, and associated run script.21// CRASH_ENV: failing because environment variable 'FORCE_CLANG_DIAGNOSTICS_CRASH' is set22// CRASH_ENV: Preprocessed source(s) and associated run script(s) are located at:23// CRASH_ENV-NEXT: note: diagnostic msg: {{.*}}.m24// CRASH_ENV-NEXT: note: diagnostic msg: {{.*}}.cache25// CRASH_ENV-NEXT: note: diagnostic msg: {{.*}}.sh26// CRASH_ENV-NEXT: note: diagnostic msg: Crash backtrace is located in27// CRASH_ENV-NEXT: note: diagnostic msg: {{.*}}Library/Logs/DiagnosticReports{{.*}}28 29// CRASH_FLAG: failing because '-gen-reproducer' is used30// CRASH_FLAG: Preprocessed source(s) and associated run script(s) are located at:31// CRASH_FLAG-NEXT: note: diagnostic msg: {{.*}}.m32// CRASH_FLAG-NEXT: note: diagnostic msg: {{.*}}.cache33// CRASH_FLAG-NEXT: note: diagnostic msg: {{.*}}.sh34// CRASH_FLAG-NEXT: note: diagnostic msg: Crash backtrace is located in35// CRASH_FLAG-NEXT: note: diagnostic msg: {{.*}}Library/Logs/DiagnosticReports{{.*}}36