brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 18e1b4e Raw
43 lines · c
1// RUN: export LSAN_OPTIONS=detect_leaks=02// RUN: rm -rf %t && mkdir %t3 4// RUN: echo "%s -fcrash-diagnostics-dir=%t -fsyntax-only" | sed -e 's/\\/\\\\/g' > %t.rsp5 6// RUN: not %clang -DFATAL @%t.rsp -gen-reproducer=off    2>&1 | FileCheck %s --check-prefix=NOT7// RUN: not %clang -DFATAL @%t.rsp -fno-crash-diagnostics 2>&1 | FileCheck %s --check-prefix=NOT8// RUN: not %clang -DFATAL @%t.rsp                        2>&1 | FileCheck %s9// RUN: not %clang -DFATAL @%t.rsp -gen-reproducer=crash  2>&1 | FileCheck %s10// RUN: not %clang -DFATAL @%t.rsp -gen-reproducer=error  2>&1 | FileCheck %s11// RUN: not %clang -DFATAL @%t.rsp -gen-reproducer=always 2>&1 | FileCheck %s12// RUN: not %clang -DFATAL @%t.rsp -gen-reproducer        2>&1 | FileCheck %s13 14// RUN: not %clang -DERROR @%t.rsp -gen-reproducer=off    2>&1 | FileCheck %s --check-prefix=NOT15// RUN: not %clang -DERROR @%t.rsp -fno-crash-diagnostics 2>&1 | FileCheck %s --check-prefix=NOT16// RUN: not %clang -DERROR @%t.rsp                        2>&1 | FileCheck %s --check-prefix=NOT17// RUN: not %clang -DERROR @%t.rsp -gen-reproducer=crash  2>&1 | FileCheck %s --check-prefix=NOT18// RUN: not %clang -DERROR @%t.rsp -gen-reproducer=error  2>&1 | FileCheck %s19// RUN: not %clang -DERROR @%t.rsp -gen-reproducer=always 2>&1 | FileCheck %s20// RUN: not %clang -DERROR @%t.rsp -gen-reproducer        2>&1 | FileCheck %s21 22// RUN:     %clang         @%t.rsp -gen-reproducer=off    2>&1 | FileCheck %s --check-prefix=NOT --allow-empty23// RUN:     %clang         @%t.rsp -fno-crash-diagnostics 2>&1 | FileCheck %s --check-prefix=NOT --allow-empty24// RUN:     %clang         @%t.rsp                        2>&1 | FileCheck %s --check-prefix=NOT --allow-empty25// RUN:     %clang         @%t.rsp -gen-reproducer=crash  2>&1 | FileCheck %s --check-prefix=NOT --allow-empty26// RUN:     %clang         @%t.rsp -gen-reproducer=error  2>&1 | FileCheck %s --check-prefix=NOT --allow-empty27// RUN: not %clang         @%t.rsp -gen-reproducer=always 2>&1 | FileCheck %s28// RUN: not %clang         @%t.rsp -gen-reproducer        2>&1 | FileCheck %s29 30// RUN: not %clang -gen-reproducer=badvalue 2>&1 | FileCheck %s --check-prefix=BAD-VALUE31// BAD-VALUE: Unknown value for -gen-reproducer=: 'badvalue'32 33// CHECK:   note: diagnostic msg: {{.*}}emit-reproducer-{{.*}}.c34// NOT-NOT: note: diagnostic msg: {{.*}}emit-reproducer-{{.*}}.c35 36#ifdef FATAL37#pragma clang __debug crash38#elif ERROR39int main40#else41int main() {}42#endif43