mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Support to keep bounds derived on implicit integer casts.
This commit is contained in:
@@ -192,3 +192,19 @@ int test16(int i) {
|
||||
long l;
|
||||
l = i;
|
||||
}
|
||||
|
||||
// implicit integer casts
|
||||
void test17(int i, long l) {
|
||||
if (i < l) {
|
||||
sink(i);
|
||||
}
|
||||
if (i < l - 2) {
|
||||
sink (i);
|
||||
}
|
||||
}
|
||||
|
||||
void test18(int x, int y) {
|
||||
if (x < y - 2) {
|
||||
sink(x);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user