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 8647e64 commit 4c81a59
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cfg/std.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7914,6 +7914,17 @@ initializer list (7) string& replace (const_iterator i1, const_iterator i2, init
<not-bool/>
</arg>
</function>
<!-- bool std::bitset< N >::test( std::size_t pos ) const -->
<function name="std::bitset::test">
<noreturn>false</noreturn>
<use-retval/>
<returnValue type="bool"/>
<leak-ignore/>
<const/>
<arg nr="1" direction="in">
<not-uninit/>
</arg>
</function>
<!-- std::pair<iterator,iterator> std::map::equal_range( const Key& key ); -->
<!-- std::pair<const_iterator,const_iterator> std::map::equal_range( const Key& key ) const; -->
<!-- template< class K > std::pair<iterator,iterator> std::map::equal_range( const K& x ); // since C++14 -->
Expand Down
9 changes: 9 additions & 0 deletions test/cfg/std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@
#include <vector>
#include <cstdarg>
#include <functional>
#include <bitset>

std::bitset<10> std_bitset_test_ignoredReturnValue()
{
std::bitset<10> b1("1111010000");
// cppcheck-suppress ignoredReturnValue
b1.test(2);
return b1;
}

void valid_code()
{
Expand Down

0 comments on commit 4c81a59

Please sign in to comment.