Skip to content

Commit c07a608

Browse files
committed
C++: Simplify IteratorAssignArithmeticOperator.
1 parent 1edfd04 commit c07a608

File tree

1 file changed

+1
-3
lines changed
  • cpp/ql/src/semmle/code/cpp/models/implementations

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,9 @@ private class IteratorSubOperator extends Operator, TaintFunction {
157157
* A non-member `operator+=` or `operator-=` function for an iterator type.
158158
*/
159159
private class IteratorAssignArithmeticOperator extends Operator, DataFlowFunction, TaintFunction {
160-
FunctionInput iteratorInput;
161-
162160
IteratorAssignArithmeticOperator() {
163161
this.hasName(["operator+=", "operator-="]) and
164-
iteratorInput = getIteratorArgumentInput(this, 0)
162+
exists(getIteratorArgumentInput(this, 0))
165163
}
166164

167165
override predicate hasDataFlow(FunctionInput input, FunctionOutput output) {

0 commit comments

Comments
 (0)