[ELF] Avoid make in elf::writeARMCmseImportLib
[llvm-project.git] / clang / test / Analysis / silence-checkers-and-packages-core-div-by-zero.cpp
blob3930f5a602534f63e65be4ee76b1e6666374736c
1 // RUN: %clang_analyze_cc1 \
2 // RUN: -analyzer-checker=core -analyzer-config \
3 // RUN: silence-checkers=core.DivideZero \
4 // RUN: -verify %s
6 void test_disable_core_div_by_zero() {
7 (void)(1 / 0);
8 // expected-warning@-1 {{division by zero is undefined}}
9 // no-warning: 'Division by zero'
12 void test_disable_null_deref(int *p) {
13 if (p)
14 return;
16 int x = p[0];
17 // expected-warning@-1 {{Array access (from variable 'p') results in a null pointer dereference}}