C++: Move the rest of of StdSequenceContainerBeginEnd into BeginOrEndFunction.

This commit is contained in:
Geoffrey White
2020-10-02 16:57:51 +01:00
parent 8d5bd2289b
commit 1efe461a98
2 changed files with 3 additions and 17 deletions

View File

@@ -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
}

View File

@@ -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.
*/