mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
C++: Replace 'int' with 'float' in tests and accept test changes.
This commit is contained in:
@@ -29,7 +29,7 @@ private string getDirectionString(boolean d) {
|
||||
}
|
||||
|
||||
bindingset[value]
|
||||
private string getOffsetString(int value) {
|
||||
private string getOffsetString(float value) {
|
||||
if value >= 0 then result = "+" + value.toString() else result = value.toString()
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ bindingset[s]
|
||||
string quote(string s) { if s.matches("% %") then result = "\"" + s + "\"" else result = s }
|
||||
|
||||
bindingset[delta]
|
||||
private string getBoundString(SemBound b, int delta) {
|
||||
private string getBoundString(SemBound b, float delta) {
|
||||
b instanceof SemZeroBound and result = delta.toString()
|
||||
or
|
||||
result =
|
||||
@@ -51,7 +51,7 @@ private string getBoundString(SemBound b, int delta) {
|
||||
}
|
||||
|
||||
private string getARangeString(SemExpr e) {
|
||||
exists(SemBound b, int delta, boolean upper |
|
||||
exists(SemBound b, float delta, boolean upper |
|
||||
semBounded(e, b, delta, upper, _) and
|
||||
if semBounded(e, b, delta, upper.booleanNot(), _)
|
||||
then delta != 0 and result = "==" + getBoundString(b, delta)
|
||||
|
||||
@@ -741,7 +741,7 @@ unsigned long mult_rounding() {
|
||||
range(y); // $ range===1000000003
|
||||
range(x); // $ range===1000000003
|
||||
xy = x * y;
|
||||
range(xy);
|
||||
range(xy); // $ range===1000000006000000000
|
||||
return xy; // BUG: upper bound should be >= 1000000006000000009UL
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user