mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +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 {
|
class BeginOrEndFunction extends MemberFunction, TaintFunction {
|
||||||
BeginOrEndFunction() {
|
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
|
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.
|
* The standard container `swap` functions.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user