mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
C++: Move the rest of of StdSequenceContainerBeginEnd into BeginOrEndFunction.
This commit is contained in:
@@ -280,7 +280,9 @@ class IteratorArrayMemberOperator extends MemberFunction, TaintFunction, Iterato
|
||||
*/
|
||||
class BeginOrEndFunction extends MemberFunction, TaintFunction {
|
||||
BeginOrEndFunction() {
|
||||
this.hasName(["begin", "cbegin", "rbegin", "crbegin", "end", "cend", "rend", "crend"]) and
|
||||
this
|
||||
.hasName(["begin", "cbegin", "rbegin", "crbegin", "end", "cend", "rend", "crend",
|
||||
"before_begin", "cbefore_begin"]) and
|
||||
this.getType().getUnspecifiedType() instanceof Iterator
|
||||
}
|
||||
|
||||
|
||||
@@ -170,22 +170,6 @@ class StdSequenceContainerAssign extends TaintFunction {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The standard container `before_begin` and `cbefore_begin` functions.
|
||||
*/
|
||||
class StdSequenceContainerBeginEnd extends TaintFunction {
|
||||
StdSequenceContainerBeginEnd() {
|
||||
this
|
||||
.hasQualifiedName("std", "forward_list",
|
||||
["before_begin", "cbefore_begin"])
|
||||
}
|
||||
|
||||
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
|
||||
input.isQualifierObject() and
|
||||
output.isReturnValue()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The standard container `swap` functions.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user