File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
cpp/misra/src/rules/RULE-9-5-1 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,8 @@ predicate loopVariableAssignedToNonConstPointerOrReferenceType(
9090 strippedType = targetType .stripTopLevelSpecifiers ( ) and
9191 not strippedType .getBaseType ( ) .isConst ( ) and
9292 (
93- targetType instanceof PointerType or
94- targetType instanceof ReferenceType
93+ strippedType instanceof PointerType or
94+ strippedType instanceof ReferenceType
9595 )
9696 |
9797 assignmentRhs .getEnclosingStmt ( ) .getParent * ( ) = forLoop .getStmt ( ) and
@@ -118,7 +118,7 @@ predicate loopVariableAssignedToNonConstPointerOrReferenceType(
118118 * This predicate adds two constraints to the target type, as compared to the original
119119 * portion of the predicate:
120120 *
121- * 1. This predicate adds type constraint that the target type is a `ReferenceType`.
121+ * 1. This predicate adds a type constraint that the target type is a `ReferenceType`.
122122 * 2. This predicate adds the constraint that the target type is not `const`.
123123 *
124124 * Also, this predicate requires that the call is the body of the given for-loop.
You can’t perform that action at this time.
0 commit comments