Skip to content

Commit 3c223ac

Browse files
committed
Fix comments
- Fix typo - Do not need to handle rem by zero
1 parent 12494a4 commit 3c223ac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cpp/common/src/codingstandards/cpp/SimpleRangeAnalysisCustomizations.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private class RemAssignSimpleRange extends SimpleRangeAnalysisExpr, AssignRemExp
161161
maxDivisorNegated = (getFullyConvertedUpperBounds(getRValue()).abs() - 1) * -1 and
162162
// Find the lower bounds of the dividend
163163
dividendLowerBounds = getFullyConvertedLowerBounds(getLValue()) and
164-
// The lower bound is caluclated in two steps:
164+
// The lower bound is calculated in two steps:
165165
// 1. Determine the maximum of the dividend lower bound and maxDivisorNegated.
166166
// When the dividend is negative this will result in a negative result
167167
// 2. Find the minimum with 0. If the divided is always >0 this will produce 0
@@ -172,7 +172,6 @@ private class RemAssignSimpleRange extends SimpleRangeAnalysisExpr, AssignRemExp
172172
}
173173

174174
override float getUpperBounds() {
175-
// TODO rem zero?
176175
exists(float maxDivisor, float maxDividend |
177176
// The maximum divisor value is the absolute value of the divisor minus 1
178177
maxDivisor = getFullyConvertedUpperBounds(getRValue()).abs() - 1 and

0 commit comments

Comments
 (0)