std.cfg: Added support for more interfaces

This commit is contained in:
orbitcowboy 2021-06-03 07:55:26 +02:00
parent a585834445
commit 39912b5096
2 changed files with 36 additions and 0 deletions

View File

@ -7914,6 +7914,18 @@ initializer list (7) string& replace (const_iterator i1, const_iterator i2, init
<not-bool/>
</arg>
</function>
<!-- bool all() const noexcept; (since C++11) -->
<!-- bool any() const; (until C++11) -->
<!-- bool any() const noexcept; (since C++11) -->
<!-- bool none() const; (until C++11) -->
<!-- bool none() const noexcept; (since C++11)-->
<function name="std::bitset::all,std::bitset::any,std::bitset::none">
<noreturn>false</noreturn>
<use-retval/>
<returnValue type="bool"/>
<leak-ignore/>
<const/>
</function>
<!-- bool std::bitset< N >::test( std::size_t pos ) const -->
<function name="std::bitset::test">
<noreturn>false</noreturn>

View File

@ -38,6 +38,30 @@ std::bitset<10> std_bitset_test_ignoredReturnValue()
return b1;
}
std::bitset<10> std_bitset_all_ignoredReturnValue()
{
std::bitset<10> b1("1111010000");
// cppcheck-suppress ignoredReturnValue
b1.all();
return b1;
}
std::bitset<10> std_bitset_none_ignoredReturnValue()
{
std::bitset<10> b1("1111010000");
// cppcheck-suppress ignoredReturnValue
b1.none();
return b1;
}
std::bitset<10> std_bitset_any_ignoredReturnValue()
{
std::bitset<10> b1("1111010000");
// cppcheck-suppress ignoredReturnValue
b1.any();
return b1;
}
void valid_code()
{
std::vector<int> vecInt{0, 1, 2};