Skip to content

Commit 0f998ea

Browse files
committed
Add more test cases
1 parent 01216fa commit 0f998ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cpp/misra/test/rules/RULE-9-5-1/test.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ int main() {
135135
j++;
136136
}
137137

138+
for (int i = 0; i < j++;
139+
i++) { // NON_COMPLIANT: The loop bound `j` is mutated in the loop
140+
}
141+
142+
for (int i = 0; i++ < j++;
143+
i++) { // NON_COMPLIANT: The loop bound `j` is mutated in the loop
144+
}
145+
138146
int n = 0;
139147

140148
for (int i = 0; i < k;

0 commit comments

Comments
 (0)