Ted Kremenek | ade3195 | 2011-03-12 06:14:28 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -analyze -analyzer-checker=core,deadcode.DeadStores,debug.Stats -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s |
Tom Care | 52d861c | 2010-09-10 00:44:44 +0000 | [diff] [blame] | 2 | |
| 3 | int foo(); |
| 4 | |
Jordan Rose | 4a374f9 | 2013-03-14 17:18:30 +0000 | [diff] [blame] | 5 | int test() { // expected-warning-re{{test -> Total CFGBlocks: [0-9]+ \| Unreachable CFGBlocks: 0 \| Exhausted Block: no \| Empty WorkList: yes}} |
Tom Care | 52d861c | 2010-09-10 00:44:44 +0000 | [diff] [blame] | 6 | int a = 1; |
| 7 | a = 34 / 12; |
| 8 | |
| 9 | if (foo()) |
| 10 | return a; |
| 11 | |
| 12 | a /= 4; |
| 13 | return a; |
| 14 | } |