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

Skip to content

Commit 6f0cc16

Browse files
author
Robert Marsh
committed
C++: remove non-existent operators from model
1 parent 8326074 commit 6f0cc16

1 file changed

Lines changed: 0 additions & 37 deletions

File tree

  • cpp/ql/src/semmle/code/cpp/models/implementations

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

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -97,27 +97,6 @@ class IteratorCrementOperator extends Operator, DataFlowFunction {
9797
}
9898
}
9999

100-
/**
101-
* A non-member `operator->` function for an iterator type.
102-
*/
103-
class IteratorFieldOperator extends Operator, TaintFunction {
104-
IteratorFieldOperator() {
105-
this.hasName("operator->") and
106-
this
107-
.getACallToThisFunction()
108-
.getArgument(0)
109-
.getFullyConverted()
110-
.getUnspecifiedType()
111-
.(PointerType)
112-
.getBaseType() instanceof Iterator
113-
}
114-
115-
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
116-
input.isParameterDeref(0) and
117-
output.isReturnValue()
118-
}
119-
}
120-
121100
/**
122101
* A non-member `operator+` function for an iterator type.
123102
*/
@@ -194,22 +173,6 @@ class IteratorAssignArithmeticOperator extends Operator, DataFlowFunction, Taint
194173
}
195174
}
196175

197-
/**
198-
* A non-member `operator[]` function for an iterator type.
199-
*/
200-
class IteratorArrayOperator extends Operator, TaintFunction {
201-
IteratorArrayOperator() {
202-
this.hasName("operator[]") and
203-
this.getACallToThisFunction().getArgument(0).getType().(PointerType).getBaseType() instanceof
204-
Iterator
205-
}
206-
207-
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
208-
(input.isParameter(0) or input.isParameter(1)) and
209-
output.isReturnValue()
210-
}
211-
}
212-
213176
/**
214177
* A prefix `operator*` member function for an iterator type.
215178
*/

0 commit comments

Comments
 (0)