Skip to content

Commit

Permalink
added test for #12378 FN containerOutOfBounds with scope operator
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored and firewave committed Jan 23, 2024
1 parent 63dde63 commit c08adf1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/cfg/std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4925,6 +4925,13 @@ std::string global_scope_std() // #12355
return ss.str();
}

::std::size_t global_scope_std2() // #12378
{
std::vector<::std::size_t> v;
// cppcheck-suppress containerOutOfBounds
return v.front();
}

void unique_lock_const_ref(std::mutex& m)
{
std::unique_lock lock(m);
Expand Down

0 comments on commit c08adf1

Please sign in to comment.