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
[ELF] Avoid make in elf::writeARMCmseImportLib
[llvm-project.git]
/
clang
/
test
/
Analysis
/
PR35418.cpp
blob
658da72f1462d4d436e8cf3f9984faa07ef1f142
1
// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
2
3
// expected-no-diagnostics
4
5
void
halt
()
__attribute__
((
__noreturn__
));
6
void
assert
(
int
b
) {
7
if
(!
b
)
8
halt
();
9
}
10
11
void
decode
(
unsigned
width
) {
12
assert
(
width
>
0
);
13
14
int
base
;
15
bool
inited
=
false
;
16
17
int
i
=
0
;
18
19
if
(
i
%
width
==
0
) {
20
base
=
512
;
21
inited
=
true
;
22
}
23
24
base
+=
1
;
// no-warning
25
26
if
(
base
>>
10
)
27
assert
(
false
);
28
}