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
/
div-zero.cpp
blob
063450d8883b090e9096a6139d2fa3e3ffc637fb
1
// RUN: %clang_analyze_cc1 -analyzer-checker=core.DivideZero -verify %s
2
3
int
fooPR10616
(
int
qX
) {
4
int
a
,
c
,
d
;
5
6
d
= (
qX
-
1
);
7
while
(
d
!=
0
) {
8
d
=
c
- (
c
/
d
) *
d
;
9
}
10
11
return
(
a
% (
qX
-
1
));
// expected-warning {{Division by zero}}
12
13
}