Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / uninit-exhaustive-switch-bug.c
blob4855b93716222562c69e41ff29262c7a604d77e2
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
2 // expected-no-diagnostics
4 int rand(void);
6 void test(void) {
7 int offset = 0;
8 int value;
9 int test = rand();
10 switch (test & 0x1) {
11 case 0:
12 case 1:
13 value = 0;
14 break;
17 offset += value; // no-warning