mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
C++: remove non-existent operators from model
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user