19 lines · c
1// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s2// expected-no-diagnostics3 4int rand(void);5 6void 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;15 }16 17 offset += value; // no-warning18}19