std.cfg: Added more tests for some std::vector functions.
This commit is contained in:
parent
7176632bc6
commit
ef62207ada
|
@ -6056,6 +6056,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
|
|||
</function>
|
||||
<function name="std::list::pop_back,std::list::pop_front,std::forward_list::pop_front,std::vector::pop_back">
|
||||
<noreturn>false</noreturn>
|
||||
<returnValue type="void"/>
|
||||
</function>
|
||||
<function name="std::stack::pop,std::queue::pop">
|
||||
<noreturn>false</noreturn>
|
||||
|
|
|
@ -3267,7 +3267,18 @@ void stdstring()
|
|||
|
||||
void stdvector()
|
||||
{
|
||||
int uninit;
|
||||
std::vector<int> v;
|
||||
// cppcheck-suppress ignoredReturnValue
|
||||
v.size();
|
||||
// cppcheck-suppress uninitvar
|
||||
v.push_back(uninit);
|
||||
|
||||
// no warning is expected for pop_back()
|
||||
v.push_back(42);
|
||||
v.pop_back();
|
||||
|
||||
v.push_back(42);
|
||||
// cppcheck-suppress ignoredReturnValue
|
||||
v.back();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue