std.cfg: Added support for more interfaces

This commit is contained in:
orbitcowboy 2021-06-03 08:07:53 +02:00
parent 39912b5096
commit f626035963
2 changed files with 32 additions and 5 deletions

View File

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

View File

@ -62,6 +62,22 @@ std::bitset<10> std_bitset_any_ignoredReturnValue()
return b1;
}
std::bitset<10> std_bitset_size_ignoredReturnValue()
{
std::bitset<10> b1("1111010000");
// cppcheck-suppress ignoredReturnValue
b1.size();
return b1;
}
std::bitset<10> std_bitset_count_ignoredReturnValue()
{
std::bitset<10> b1("1111010000");
// cppcheck-suppress ignoredReturnValue
b1.count();
return b1;
}
void valid_code()
{
std::vector<int> vecInt{0, 1, 2};