Skip to content

Commit 1efe461

Browse files
committed
C++: Move the rest of of StdSequenceContainerBeginEnd into BeginOrEndFunction.
1 parent 8d5bd22 commit 1efe461

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ class IteratorArrayMemberOperator extends MemberFunction, TaintFunction, Iterato
280280
*/
281281
class BeginOrEndFunction extends MemberFunction, TaintFunction {
282282
BeginOrEndFunction() {
283-
this.hasName(["begin", "cbegin", "rbegin", "crbegin", "end", "cend", "rend", "crend"]) and
283+
this
284+
.hasName(["begin", "cbegin", "rbegin", "crbegin", "end", "cend", "rend", "crend",
285+
"before_begin", "cbefore_begin"]) and
284286
this.getType().getUnspecifiedType() instanceof Iterator
285287
}
286288

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -170,22 +170,6 @@ class StdSequenceContainerAssign extends TaintFunction {
170170
}
171171
}
172172

173-
/**
174-
* The standard container `before_begin` and `cbefore_begin` functions.
175-
*/
176-
class StdSequenceContainerBeginEnd extends TaintFunction {
177-
StdSequenceContainerBeginEnd() {
178-
this
179-
.hasQualifiedName("std", "forward_list",
180-
["before_begin", "cbefore_begin"])
181-
}
182-
183-
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
184-
input.isQualifierObject() and
185-
output.isReturnValue()
186-
}
187-
}
188-
189173
/**
190174
* The standard container `swap` functions.
191175
*/

0 commit comments

Comments
 (0)