Sign in
llvm
/
clang
/
e8264bb9815647b4c6558aeb045c65965cdb26d3
/
.
/
test
/
Analysis
/
div-zero.cpp
blob: 063450d8883b090e9096a6139d2fa3e3ffc637fb [
file
] [
log
] [
blame
]
// RUN: %clang_analyze_cc1 -analyzer-checker=core.DivideZero -verify %s
int
fooPR10616
(
int
qX
)
{
int
a
,
c
,
d
;
d
=
(
qX
-
1
);
while
(
d
!=
0
)
{
d
=
c
-
(
c
/
d
)
*
d
;
}
return
(
a
%
(
qX
-
1
));
// expected-warning {{Division by zero}}
}