Skip to content

Commit b13ffd2

Browse files
committed
Slightly change wording in the message
Both `TLoopBoundIsMutatedVariableAccess` and `TLoopStepIsMutatedVariableAccess` transitively rely on `valueToUpdate`, which overapproximates by looking at the types alone. Therefore we'd like to drop the confidence slightly in reporting the expression where the expression *might* have been changed.
1 parent e135fe6 commit b13ffd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/misra/src/rules/RULE-9-5-1/LegacyForStatementsShouldBeSimple.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,13 @@ class AlertType extends TAlertType {
384384
result = "The $@ is a $@."
385385
or
386386
this = TLoopBoundIsMutatedVariableAccess(_, _, _) and
387-
result = "The $@ is a non-const expression, or a variable that is $@ in the loop."
387+
result = "The $@ is a non-const expression, or a variable that may be $@ in the loop."
388388
or
389389
this = TLoopStepIsNonConstExpr(_, _) and
390390
result = "The $@ is a $@."
391391
or
392392
this = TLoopStepIsMutatedVariableAccess(_, _, _) and
393-
result = "The $@ is a non-const expression, or a variable that is $@ in the loop."
393+
result = "The $@ is a non-const expression, or a variable that may be $@ in the loop."
394394
or
395395
this = TLoopCounterIsTakenNonConstAddress(_, _) and
396396
result = "The $@ is taken as a mutable reference or its address to a mutable pointer."

0 commit comments

Comments
 (0)