Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c8cdf68

Browse files
author
Robert Marsh
committed
C++: Remove StdStringBeginEnd
1 parent 703db0b commit c8cdf68

2 files changed

Lines changed: 4 additions & 17 deletions

File tree

cpp/ql/src/semmle/code/cpp/models/implementations/Iterator.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ class IteratorArrayMemberOperator extends MemberFunction, TaintFunction {
272272
}
273273
}
274274

275+
/**
276+
* A `begin` or `end` member function, or a related member function, that
277+
* returns an iterator.
278+
*/
275279
class BeginOrEndFunction extends MemberFunction, TaintFunction {
276280
BeginOrEndFunction() {
277281
this.hasName(["begin", "cbegin", "rbegin", "crbegin", "end", "cend", "rend", "crend"]) and

cpp/ql/src/semmle/code/cpp/models/implementations/StdString.qll

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -212,23 +212,6 @@ class StdStringAssign extends TaintFunction {
212212
}
213213
}
214214

215-
/**
216-
* The standard functions `std::string.begin` and `std::string.end` and their
217-
* variants.
218-
*/
219-
class StdStringBeginEnd extends TaintFunction {
220-
StdStringBeginEnd() {
221-
this
222-
.hasQualifiedName("std", "basic_string",
223-
["begin", "cbegin", "rbegin", "crbegin", "end", "cend", "rend", "crend"])
224-
}
225-
226-
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
227-
input.isQualifierObject() and
228-
output.isReturnValue()
229-
}
230-
}
231-
232215
/**
233216
* The standard function `std::string.copy`.
234217
*/

0 commit comments

Comments
 (0)