C++: Remove StdStringBeginEnd

This commit is contained in:
Robert Marsh
2020-08-25 16:34:36 -07:00
parent 703db0b9a6
commit c8cdf68bf9
2 changed files with 4 additions and 17 deletions

View File

@@ -272,6 +272,10 @@ class IteratorArrayMemberOperator extends MemberFunction, TaintFunction {
}
}
/**
* A `begin` or `end` member function, or a related member function, that
* returns an iterator.
*/
class BeginOrEndFunction extends MemberFunction, TaintFunction {
BeginOrEndFunction() {
this.hasName(["begin", "cbegin", "rbegin", "crbegin", "end", "cend", "rend", "crend"]) and

View File

@@ -212,23 +212,6 @@ class StdStringAssign extends TaintFunction {
}
}
/**
* The standard functions `std::string.begin` and `std::string.end` and their
* variants.
*/
class StdStringBeginEnd extends TaintFunction {
StdStringBeginEnd() {
this
.hasQualifiedName("std", "basic_string",
["begin", "cbegin", "rbegin", "crbegin", "end", "cend", "rend", "crend"])
}
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
input.isQualifierObject() and
output.isReturnValue()
}
}
/**
* The standard function `std::string.copy`.
*/