Files
codeql/cpp/ql/test/library-tests/rangeanalysis/signanalysis/bounded_bounds.c
Robert Marsh d9495da225 C++: fix test
2018-11-09 10:15:28 -08: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;
}