1 // RUN: %clang_analyze_cc1 \
2 // RUN: -analyzer-checker=core -analyzer-config \
3 // RUN: silence-checkers=core \
6 // RUN: %clang_analyze_cc1 \
7 // RUN: -analyzer-checker=core -analyzer-config \
8 // RUN: silence-checkers="core.DivideZero;core.NullDereference" \
11 // RUN: not %clang_analyze_cc1 -verify %s \
12 // RUN: -analyzer-checker=core -analyzer-config \
13 // RUN: silence-checkers=core.NullDeref \
14 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-CHECKER-ERROR
16 // CHECK-CHECKER-ERROR: (frontend): no analyzer checkers or packages
17 // CHECK-CHECKER-ERROR-SAME: are associated with 'core.NullDeref'
19 // RUN: not %clang_analyze_cc1 -verify %s \
20 // RUN: -analyzer-checker=core -analyzer-config \
21 // RUN: silence-checkers=coreModeling \
22 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-PACKAGE-ERROR
24 // CHECK-PACKAGE-ERROR: (frontend): no analyzer checkers or packages
25 // CHECK-PACKAGE-ERROR-SAME: are associated with 'coreModeling'
27 void test_disable_core_div_by_zero() {
29 // expected-warning@-1 {{division by zero is undefined}}
30 // no-warning: 'Division by zero'
33 void test_disable_null_deref(int *p
) {
38 // no-warning: Array access (from variable 'p') results in a null pointer dereference