blob: 5a40d196bb1fde81068db4eeb3d86709c9e8bd09 [file] [log] [blame]
Dominic Chen184c6242017-03-03 18:02:02 +00001// RUN: %clang_analyze_cc1 -analyzer-checker=core,deadcode.DeadStores,debug.Stats -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s
Tom Care4545b2d2010-09-10 00:44:44 +00002
3int foo();
4
Alp Toker6ed72512013-12-14 01:07:05 +00005int test() { // expected-warning-re{{test -> Total CFGBlocks: {{[0-9]+}} | Unreachable CFGBlocks: 0 | Exhausted Block: no | Empty WorkList: yes}}
Tom Care4545b2d2010-09-10 00:44:44 +00006 int a = 1;
7 a = 34 / 12;
8
9 if (foo())
10 return a;
11
12 a /= 4;
13 return a;
14}