C++: remove non-existent operators from model

This commit is contained in:
Robert Marsh
2020-08-26 15:52:53 -07:00
parent 83260740ff
commit 6f0cc16979

View File

@@ -97,27 +97,6 @@ class IteratorCrementOperator extends Operator, DataFlowFunction {
}
}
/**
* A non-member `operator->` function for an iterator type.
*/
class IteratorFieldOperator extends Operator, TaintFunction {
IteratorFieldOperator() {
this.hasName("operator->") and
this
.getACallToThisFunction()
.getArgument(0)
.getFullyConverted()
.getUnspecifiedType()
.(PointerType)
.getBaseType() instanceof Iterator
}
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
input.isParameterDeref(0) and
output.isReturnValue()
}
}
/**
* A non-member `operator+` function for an iterator type.
*/
@@ -194,22 +173,6 @@ class IteratorAssignArithmeticOperator extends Operator, DataFlowFunction, Taint
}
}
/**
* A non-member `operator[]` function for an iterator type.
*/
class IteratorArrayOperator extends Operator, TaintFunction {
IteratorArrayOperator() {
this.hasName("operator[]") and
this.getACallToThisFunction().getArgument(0).getType().(PointerType).getBaseType() instanceof
Iterator
}
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
(input.isParameter(0) or input.isParameter(1)) and
output.isReturnValue()
}
}
/**
* A prefix `operator*` member function for an iterator type.
*/