Files
codeql/cpp/ql/test/experimental/library-tests/rangeanalysis/signanalysis/bounded_bounds.c
2020-06-24 12:50:14 -07:00

20 lines
262 B
C

int f(int x, int y) {
if (x < 0) {
return x;
}
if (x < y) {
return y; // y is strictly positive because of the bound on x above
}
return 0;
}
int g(int x, int y) {
if (x < y) {
return y;
}
if (x < 0) {
return x;
}
return 0;
}