You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
306 B
21 lines
306 B
7 months ago
|
// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
|
||
|
|
||
|
// rdar://problem/54359410
|
||
|
// expected-no-diagnostics
|
||
|
|
||
|
int rand();
|
||
|
|
||
|
void test() {
|
||
|
int offset = 0;
|
||
|
int value;
|
||
|
int test = rand();
|
||
|
switch (test & 0x1) {
|
||
|
case 0:
|
||
|
case 1:
|
||
|
value = 0;
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
offset += value; // no-warning
|
||
|
}
|