#9455: Added a test case.
This commit is contained in:
parent
d1f225b8ee
commit
f59a2b491d
|
@ -7105,9 +7105,9 @@ initializer list (7) string& replace (const_iterator i1, const_iterator i2, init
|
|||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- InputIterator std::find(InputIterator first, InputIterator last, T val) -->
|
||||
<!-- InputIterator std::find_if(InputIterator first, InputIterator last, UnaryPredicate val) -->
|
||||
<!-- InputIterator std::find_if_not(InputIterator first, InputIterator last, UnaryPredicate val) -->
|
||||
<!-- template< class InputIterator, class T > InputIterator std::find(InputIterator first, InputIterator last, T val) -->
|
||||
<!-- template< class InputIterator, class UnaryPredicate > InputIterator std::find_if(InputIterator first, InputIterator last, UnaryPredicate val) -->
|
||||
<!-- template< class InputIterator, class UnaryPredicate > InputIterator std::find_if_not(InputIterator first, InputIterator last, UnaryPredicate val) -->
|
||||
<function name="std::find,std::find_if,std::find_if_not">
|
||||
<use-retval/>
|
||||
<returnValue type="iterator" container="1"/>
|
||||
|
|
|
@ -3293,6 +3293,12 @@ void stdalgorithm(const std::list<int> &ints1, const std::list<int> &ints2)
|
|||
// cppcheck-suppress mismatchingContainers
|
||||
if (std::find(ints1.begin(), ints1.end(), 123) == ints2.end()) {}
|
||||
|
||||
// #9455
|
||||
std::list<int>::const_iterator uninitItBegin;
|
||||
std::list<int>::const_iterator uninitItEnd;
|
||||
// @todo cppcheck-suppress uninitvar
|
||||
if (std::find(uninitItBegin, uninitItEnd, 123) == uninitItEnd) {}
|
||||
|
||||
// <!-- InputIterator std::find_if(InputIterator first, InputIterator last, UnaryPredicate val) -->
|
||||
// cppcheck-suppress mismatchingContainers
|
||||
// cppcheck-suppress ignoredReturnValue
|
||||
|
@ -3335,10 +3341,8 @@ void stdalgorithm(const std::list<int> &ints1, const std::list<int> &ints2)
|
|||
// <!-- Function std::for_each(InputIterator first, InputIterator last, Function func) -->
|
||||
// cppcheck-suppress mismatchingContainers
|
||||
std::for_each(ints1.begin(), ints2.end(), [](int i) {});
|
||||
|
||||
}
|
||||
|
||||
|
||||
void getline()
|
||||
{
|
||||
// #837
|
||||
|
|
Loading…
Reference in New Issue