MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / beginEnd

Function beginEnd

test/cfg/std.cpp:4985–5027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4983#endif
4984
4985void beginEnd()
4986{
4987 std::vector<int> v;
4988
4989 //cppcheck-suppress ignoredReturnValue
4990 std::begin(v);
4991 //cppcheck-suppress ignoredReturnValue
4992 std::rbegin(v);
4993 //cppcheck-suppress ignoredReturnValue
4994 std::cbegin(v);
4995 //cppcheck-suppress ignoredReturnValue
4996 std::crbegin(v);
4997
4998 //cppcheck-suppress ignoredReturnValue
4999 std::end(v);
5000 //cppcheck-suppress ignoredReturnValue
5001 std::rend(v);
5002 //cppcheck-suppress ignoredReturnValue
5003 std::cend(v);
5004 //cppcheck-suppress ignoredReturnValue
5005 std::crend(v);
5006
5007 // TODO cppcheck-suppress constVariable
5008 int arr[4];
5009
5010 //cppcheck-suppress ignoredReturnValue
5011 std::begin(arr);
5012 //cppcheck-suppress ignoredReturnValue
5013 std::rbegin(arr);
5014 //cppcheck-suppress ignoredReturnValue
5015 std::cbegin(arr);
5016 //cppcheck-suppress ignoredReturnValue
5017 std::crbegin(arr);
5018
5019 //cppcheck-suppress ignoredReturnValue
5020 std::end(arr);
5021 //cppcheck-suppress ignoredReturnValue
5022 std::rend(arr);
5023 //cppcheck-suppress ignoredReturnValue
5024 std::cend(arr);
5025 //cppcheck-suppress ignoredReturnValue
5026 std::crend(arr);
5027}
5028
5029struct S_constParameter_std_begin { // #11617
5030 int a[2];

Callers

nothing calls this directly

Calls 4

cbeginFunction · 0.85
cendFunction · 0.85
beginFunction · 0.50
endFunction · 0.50

Tested by

no test coverage detected