move std function information from checkstl to std.cfg

This commit is contained in:
Daniel Marjamäki 2016-10-27 19:24:24 +02:00
parent 0b76aa0f24
commit 9c1a08ca84
2 changed files with 73 additions and 12 deletions

View File

@ -4020,9 +4020,25 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
</arg> </arg>
<arg nr="3"/> <arg nr="3"/>
</function> </function>
<!-- InputIterator std::adjacent_find(InputIterator first, InputIterator last) -->
<function name="std::adjacent_find">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<iterator container="1" type="first"/>
</arg>
<arg nr="2">
<not-uninit/>
<iterator container="1" type="last"/>
</arg>
<arg nr="3" default="">
<not-uninit/>
</arg>
</function>
<!-- InputIterator std::find(InputIterator first, InputIterator last, T val) --> <!-- InputIterator std::find(InputIterator first, InputIterator last, T val) -->
<!-- InputIterator std::find_if(InputIterator first, InputIterator last, UnaryPredicate val) --> <!-- InputIterator std::find_if(InputIterator first, InputIterator last, UnaryPredicate val) -->
<!-- InputIterator std::find_if_not(InputIterator first, InputIterator last, UnaryPredicate val) --> <!-- InputIterator std::find_if_not(InputIterator first, InputIterator last, UnaryPredicate val) -->
<!-- InputIterator std::for_each(InputIterator first, InputIterator last, Function func) -->
<!-- bool std::all_of(InputIterator first, InputIterator last, UnaryPredicate pred) --> <!-- bool std::all_of(InputIterator first, InputIterator last, UnaryPredicate pred) -->
<!-- bool std::any_of(InputIterator first, InputIterator last, UnaryPredicate pred) --> <!-- bool std::any_of(InputIterator first, InputIterator last, UnaryPredicate pred) -->
<!-- bool std::none_of(InputIterator first, InputIterator last, UnaryPredicate pred) --> <!-- bool std::none_of(InputIterator first, InputIterator last, UnaryPredicate pred) -->
@ -4042,7 +4058,30 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<function name="std::find_end,std::find_first_of"> <!-- InputIterator std::search_n(InputIterator first, InputIterator last, Size count, const T& val) -->
<function name="std::adjacent_find">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<iterator container="1" type="first"/>
</arg>
<arg nr="2">
<not-uninit/>
<iterator container="1" type="last"/>
</arg>
<arg nr="3">
<not-uninit/>
<valid>0:</valid>
</arg>
<arg nr="4">
<not-uninit/>
</arg>
<arg nr="5" default=""/>
</function>
<!-- InputIterator std::find_end(InputIterator first1, InputIterator last1, InputIterator first2, InputIterator last2) -->
<!-- InputIterator std::find_first_of(InputIterator first1, InputIterator last1, InputIterator first2, InputIterator last2) -->
<!-- InputIterator std::search(InputIterator first1, InputIterator last1, InputIterator first2, InputIterator last2) -->
<function name="std::find_end,std::find_first_of,std::search">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<arg nr="1"> <arg nr="1">
<not-uninit/> <not-uninit/>
@ -4060,6 +4099,10 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<not-uninit/> <not-uninit/>
<iterator container="2" type="last"/> <iterator container="2" type="last"/>
</arg> </arg>
<arg nr="5" default="">
<not-bool/>
<not-uninit/>
</arg>
</function> </function>
<function name="std::inplace_merge"> <function name="std::inplace_merge">
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -4076,6 +4119,24 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<iterator container="1" type="last"/> <iterator container="1" type="last"/>
</arg> </arg>
</function> </function>
<!-- InputIterator std::equal(InputIterator first1, InputIterator last1, InputIterator first2) -->
<!-- InputIterator std::mismatch(InputIterator first1, InputIterator last1, InputIterator first2) -->
<!-- InputIterator std::is_permutation(InputIterator first1, InputIterator last1, InputIterator first2) -->
<function name="std::equal,std::mismatch,std::is_permutation">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<iterator container="1" type="first"/>
</arg>
<arg nr="2">
<not-uninit/>
<iterator container="1" type="last"/>
</arg>
<arg nr="3">
<not-uninit/>
<iterator container="1" type="first"/>
</arg>
</function>
<memory> <memory>
<alloc init="false">malloc</alloc> <alloc init="false">malloc</alloc>
<alloc init="true">calloc</alloc> <alloc init="true">calloc</alloc>

View File

@ -275,19 +275,19 @@ void CheckStl::mismatchingContainersError(const Token *tok)
} }
static const std::set<std::string> algorithm2 = make_container< std::set<std::string> >() // func(begin1, end1 static const std::set<std::string> algorithm2 = make_container< std::set<std::string> >() // func(begin1, end1
<< "adjacent_find" << "all_of" << "any_of" << "binary_search" << "copy" << "copy_if" << "count" << "count_if" << "equal" << "equal_range" << "binary_search" << "copy" << "copy_if" << "equal_range"
<< "find" << "find_if" << "find_if_not" << "for_each" << "generate" << "is_heap" << "is_heap_until" << "is_partitioned" << "generate" << "is_heap" << "is_heap_until" << "is_partitioned"
<< "is_permutation" << "is_sorted" << "is_sorted_until" << "lower_bound" << "make_heap" << "max_element" << "minmax_element" << "is_permutation" << "is_sorted" << "is_sorted_until" << "lower_bound" << "make_heap" << "max_element" << "minmax_element"
<< "min_element" << "mismatch" << "move" << "move_backward" << "next_permutation" << "none_of" << "partition" << "partition_copy" << "min_element" << "mismatch" << "move" << "move_backward" << "next_permutation" << "partition" << "partition_copy"
<< "partition_point" << "pop_heap" << "prev_permutation" << "push_heap" << "random_shuffle" << "remove" << "remove_copy" << "partition_point" << "pop_heap" << "prev_permutation" << "push_heap" << "random_shuffle" << "remove" << "remove_copy"
<< "remove_copy_if" << "remove_if" << "replace" << "replace_copy" << "replace_copy_if" << "replace_if" << "reverse" << "reverse_copy" << "remove_copy_if" << "remove_if" << "replace" << "replace_copy" << "replace_copy_if" << "replace_if" << "reverse" << "reverse_copy"
<< "search_n" << "shuffle" << "sort" << "sort_heap" << "stable_partition" << "stable_sort" << "swap_ranges" << "transform" << "unique" << "shuffle" << "sort" << "sort_heap" << "stable_partition" << "stable_sort" << "swap_ranges" << "transform" << "unique"
<< "unique_copy" << "upper_bound" << "string" << "wstring" << "u16string" << "u32string"; << "unique_copy" << "upper_bound" << "string" << "wstring" << "u16string" << "u32string";
static const std::set<std::string> algorithm22 = make_container< std::set<std::string> >() // func(begin1 << end1 << begin2 << end2 static const std::set<std::string> algorithm22 = make_container< std::set<std::string> >() // func(begin1 << end1 << begin2 << end2
<< "find_end" << "find_first_of" << "includes" << "lexicographical_compare" << "merge" << "partial_sort_copy" << "includes" << "lexicographical_compare" << "merge" << "partial_sort_copy"
<< "search" << "set_difference" << "set_intersection" << "set_symmetric_difference" << "set_union"; << "set_difference" << "set_intersection" << "set_symmetric_difference" << "set_union";
static const std::set<std::string> algorithm1x1 = make_container< std::set<std::string> >() // func(begin1 << x << end1 static const std::set<std::string> algorithm1x1 = make_container< std::set<std::string> >() // func(begin1 << x << end1
<< "inplace_merge" << "nth_element" << "partial_sort" << "rotate" << "rotate_copy"; << "nth_element" << "partial_sort" << "rotate" << "rotate_copy";
static const std::string iteratorBeginFuncPattern = "begin|cbegin|rbegin|crbegin"; static const std::string iteratorBeginFuncPattern = "begin|cbegin|rbegin|crbegin";
static const std::string iteratorEndFuncPattern = "end|cend|rend|crend"; static const std::string iteratorEndFuncPattern = "end|cend|rend|crend";