Skip to content

Commit

Permalink
std.cfg: Added support for more interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitcowboy committed Jun 3, 2021
1 parent a585834 commit 39912b5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cfg/std.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
24 changes: 24 additions & 0 deletions test/cfg/std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 39912b5

Please sign in to comment.