repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git]
/
clang
/
test
/
Analysis
/
uninit-exhaustive-switch-bug.c
blob
4855b93716222562c69e41ff29262c7a604d77e2
1
// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
2
// expected-no-diagnostics
3
4
int
rand
(
void
);
5
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
;
15
}
16
17
offset
+=
value
;
// no-warning
18
}