Skip to content

Commit 440cfe9

Browse files
committed
CTR55-CPP: improve documentation known fn case
1 parent ac38e79 commit 440cfe9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cpp/cert/test/rules/CTR55-CPP/DoNotUseAnAdditiveOperatorOnAnIterator.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
| test.cpp:22:18:22:18 | i | Increment of iterator may overflow since its bounds are not checked. |
55
| test.cpp:28:31:28:31 | i | Increment of iterator may overflow since its bounds are not checked. |
66
| test.cpp:41:5:41:8 | end2 | Increment of iterator may overflow since its bounds are not checked. |
7-
| test.cpp:50:42:50:42 | i | Increment of iterator may overflow since its bounds are not checked. |
7+
| test.cpp:53:42:53:42 | i | Increment of iterator may overflow since its bounds are not checked. |

cpp/cert/test/rules/CTR55-CPP/test.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ void test_fp_reported_in_374(std::vector<int> &v) {
3838

3939
{
4040
auto end2 = v.end();
41-
end2++; // NON_COMPLIANT
42-
for (auto i = v.begin(); i != end2; ++i) { // NON_COMPLIANT[FALSE_NEGATIVE]
41+
end2++; // NON_COMPLIANT
42+
for (auto i = v.begin(); i != end2;
43+
++i) { // NON_COMPLIANT[FALSE_NEGATIVE] - case of invalidations to
44+
// check before use expected to be less frequent, can model in
45+
// future if need be
4346
}
4447
}
4548
}

0 commit comments

Comments
 (0)