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
/
division-by-zero.c
blob
33bb6fa3a6f5df89b6e262a83a71142537c5b9e4
1
// RUN: %clang_analyze_cc1 -analyzer-checker=unix.Malloc %s
2
// Do not crash due to division by zero
3
4
int
f
(
unsigned int
a
) {
5
if
(
a
<=
0
)
return
1
/
a
;
6
return
a
;
7
}