@@ -177,8 +177,7 @@ private class IteratorAssignArithmeticOperator extends Operator, DataFlowFunctio
177
177
class IteratorPointerDereferenceMemberOperator extends MemberFunction , TaintFunction ,
178
178
IteratorReferenceFunction {
179
179
IteratorPointerDereferenceMemberOperator ( ) {
180
- this .hasName ( "operator*" ) and
181
- this .getDeclaringType ( ) instanceof Iterator
180
+ this .getClassAndName ( "operator*" ) instanceof Iterator
182
181
}
183
182
184
183
override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
@@ -195,8 +194,7 @@ class IteratorPointerDereferenceMemberOperator extends MemberFunction, TaintFunc
195
194
*/
196
195
private class IteratorCrementMemberOperator extends MemberFunction , DataFlowFunction , TaintFunction {
197
196
IteratorCrementMemberOperator ( ) {
198
- this .hasName ( [ "operator++" , "operator--" ] ) and
199
- this .getDeclaringType ( ) instanceof Iterator
197
+ this .getClassAndName ( [ "operator++" , "operator--" ] ) instanceof Iterator
200
198
}
201
199
202
200
override predicate hasDataFlow ( FunctionInput input , FunctionOutput output ) {
@@ -221,8 +219,7 @@ private class IteratorCrementMemberOperator extends MemberFunction, DataFlowFunc
221
219
*/
222
220
private class IteratorFieldMemberOperator extends Operator , TaintFunction {
223
221
IteratorFieldMemberOperator ( ) {
224
- this .hasName ( "operator->" ) and
225
- this .getDeclaringType ( ) instanceof Iterator
222
+ this .getClassAndName ( "operator->" ) instanceof Iterator
226
223
}
227
224
228
225
override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
@@ -236,8 +233,7 @@ private class IteratorFieldMemberOperator extends Operator, TaintFunction {
236
233
*/
237
234
private class IteratorBinaryArithmeticMemberOperator extends MemberFunction , TaintFunction {
238
235
IteratorBinaryArithmeticMemberOperator ( ) {
239
- this .hasName ( [ "operator+" , "operator-" ] ) and
240
- this .getDeclaringType ( ) instanceof Iterator
236
+ this .getClassAndName ( [ "operator+" , "operator-" ] ) instanceof Iterator
241
237
}
242
238
243
239
override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
@@ -252,8 +248,7 @@ private class IteratorBinaryArithmeticMemberOperator extends MemberFunction, Tai
252
248
private class IteratorAssignArithmeticMemberOperator extends MemberFunction , DataFlowFunction ,
253
249
TaintFunction {
254
250
IteratorAssignArithmeticMemberOperator ( ) {
255
- this .hasName ( [ "operator+=" , "operator-=" ] ) and
256
- this .getDeclaringType ( ) instanceof Iterator
251
+ this .getClassAndName ( [ "operator+=" , "operator-=" ] ) instanceof Iterator
257
252
}
258
253
259
254
override predicate hasDataFlow ( FunctionInput input , FunctionOutput output ) {
@@ -276,8 +271,7 @@ private class IteratorAssignArithmeticMemberOperator extends MemberFunction, Dat
276
271
private class IteratorArrayMemberOperator extends MemberFunction , TaintFunction ,
277
272
IteratorReferenceFunction {
278
273
IteratorArrayMemberOperator ( ) {
279
- this .hasName ( "operator[]" ) and
280
- this .getDeclaringType ( ) instanceof Iterator
274
+ this .getClassAndName ( "operator[]" ) instanceof Iterator
281
275
}
282
276
283
277
override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
@@ -295,8 +289,7 @@ private class IteratorArrayMemberOperator extends MemberFunction, TaintFunction,
295
289
*/
296
290
private class IteratorAssignmentMemberOperator extends MemberFunction , TaintFunction {
297
291
IteratorAssignmentMemberOperator ( ) {
298
- this .hasName ( "operator=" ) and
299
- this .getDeclaringType ( ) instanceof Iterator and
292
+ this .getClassAndName ( "operator=" ) instanceof Iterator and
300
293
not this instanceof CopyAssignmentOperator and
301
294
not this instanceof MoveAssignmentOperator
302
295
}
0 commit comments