Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 440cfe9

Browse filesBrowse files
committed
CTR55-CPP: improve documentation known fn case
1 parent ac38e79 commit 440cfe9
Copy full SHA for 440cfe9

File tree

Expand file treeCollapse file tree

2 files changed

+6
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-3
lines changed

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

Copy file name to clipboardExpand all lines: cpp/cert/test/rules/CTR55-CPP/DoNotUseAnAdditiveOperatorOnAnIterator.expected
+1-1Lines 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

Copy file name to clipboardExpand all lines: cpp/cert/test/rules/CTR55-CPP/test.cpp
+5-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.