mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
C++: add neq refinement test for range analysis
This commit is contained in:
committed by
Robert Marsh
parent
6a997aba3b
commit
681cc4c755
@@ -49,3 +49,13 @@
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int f3(int x) {
|
||||||
|
for (int i = 0; i <= 100; i++) {
|
||||||
|
range(i); // $ range=<=100 range=>=0
|
||||||
|
if(i == 100) {
|
||||||
|
range(i); // $ range===100
|
||||||
|
} else {
|
||||||
|
range(i); // $ range=<=99 range=>=0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user