| 1 |
RUN: rm -rf %t.output_dir && mkdir %t.output_dir |
| 2 |
RUN: %scan-build -o %t.output_dir \ |
| 3 |
RUN: %clang -S %S/Inputs/null_dereference_and_division_by_zero.c \ |
| 4 |
RUN: | FileCheck %s -check-prefix CHECK-TWO-BUGS |
| 5 |
|
| 6 |
RUN: rm -rf %t.output_dir && mkdir %t.output_dir |
| 7 |
RUN: %scan-build -o %t.output_dir \ |
| 8 |
RUN: -disable-checker core.DivideZero \ |
| 9 |
RUN: %clang -S %S/Inputs/null_dereference_and_division_by_zero.c \ |
| 10 |
RUN: | FileCheck %s -check-prefix CHECK-ONE-BUG |
| 11 |
|
| 12 |
RUN: rm -rf %t.output_dir && mkdir %t.output_dir |
| 13 |
RUN: %scan-build -o %t.output_dir \ |
| 14 |
RUN: -disable-checker core.NullDereference \ |
| 15 |
RUN: %clang -S %S/Inputs/null_dereference_and_division_by_zero.c \ |
| 16 |
RUN: | FileCheck %s -check-prefix CHECK-ONE-BUG |
| 17 |
|
| 18 |
RUN: rm -rf %t.output_dir && mkdir %t.output_dir |
| 19 |
RUN: %scan-build -o %t.output_dir \ |
| 20 |
RUN: -disable-checker core.NullDereference \ |
| 21 |
RUN: -disable-checker core.DivideZero \ |
| 22 |
RUN: %clang -S %S/Inputs/null_dereference_and_division_by_zero.c \ |
| 23 |
RUN: | FileCheck %s -check-prefix CHECK-NO-BUGS |
| 24 |
|
| 25 |
CHECK-NO-BUGS: scan-build: No bugs found. |
| 26 |
CHECK-ONE-BUG: scan-build: 1 bug found. |
| 27 |
CHECK-TWO-BUGS: scan-build: 2 bugs found. |