xref: /llvm-project/clang/docs/analyzer/checkers/dividezero_example.c (revision 1a17032b788016299ea4e3c4b53670c6dcd94b4f)

test(int z)1*1a17032bSKristof Umann void test(int z) {
2*1a17032bSKristof Umann   if (z == 0)
3*1a17032bSKristof Umann     int x = 1 / z; // warn
4*1a17032bSKristof Umann }
5*1a17032bSKristof Umann 
test()6*1a17032bSKristof Umann void test() {
7*1a17032bSKristof Umann   int x = 1;
8*1a17032bSKristof Umann   int y = x % 0; // warn
9*1a17032bSKristof Umann }
10