xref: /minix3/external/bsd/llvm/dist/clang/test/Analysis/analyzer-stats.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -analyze -analyzer-checker=core,deadcode.DeadStores,debug.Stats -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s
2f4a2713aSLionel Sambuc 
3f4a2713aSLionel Sambuc int foo();
4f4a2713aSLionel Sambuc 
test()5*0a6a1f1dSLionel Sambuc int test() { // expected-warning-re{{test -> Total CFGBlocks: {{[0-9]+}} | Unreachable CFGBlocks: 0 | Exhausted Block: no | Empty WorkList: yes}}
6f4a2713aSLionel Sambuc   int a = 1;
7f4a2713aSLionel Sambuc   a = 34 / 12;
8f4a2713aSLionel Sambuc 
9f4a2713aSLionel Sambuc   if (foo())
10f4a2713aSLionel Sambuc     return a;
11f4a2713aSLionel Sambuc 
12f4a2713aSLionel Sambuc   a /= 4;
13f4a2713aSLionel Sambuc   return a;
14f4a2713aSLionel Sambuc }
15