Dominic Chen | 184c624 | 2017-03-03 18:02:02 +0000 | [diff] [blame] | 1 | // RUN: %clang_analyze_cc1 -analyzer-checker=core,deadcode.DeadStores,debug.Stats -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s |
Tom Care | 4545b2d | 2010-09-10 00:44:44 +0000 | [diff] [blame] | 2 | |
| 3 | int foo(); |
| 4 | |
Alp Toker | 6ed7251 | 2013-12-14 01:07:05 +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 | 4545b2d | 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 | } |