Skip to content

Commit

Permalink
Update std.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored May 27, 2024
1 parent 43a8204 commit 37eb55e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/cfg/std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5053,3 +5053,12 @@ void assertWithSideEffect_std_prev_next(const std::vector<int>& v, std::vector<i
// cppcheck-suppress checkLibraryNoReturn
assert(std::next(it, 1) == v.end());
}

std::vector<int> containerOutOfBounds_push_back() { // #12775
std::vector<int> v;
for (int i = 0; i < 4; ++i) {
v.push_back(i);
(void)v[i];
}
return v;
}

0 comments on commit 37eb55e

Please sign in to comment.