@@ -300,7 +300,7 @@ private class NSStringRegexAdditionalFlowStep extends RegexAdditionalFlowStep {
300
300
* ```
301
301
*/
302
302
class RegexEval extends CallExpr instanceof PotentialRegexEval {
303
- RegexEval ( ) { this .( PotentialRegexEval ) . doesEvaluate ( ) }
303
+ RegexEval ( ) { this .doesEvaluate ( ) }
304
304
305
305
/**
306
306
* Gets the input to this call that is the regular expression being evaluated.
@@ -309,31 +309,30 @@ class RegexEval extends CallExpr instanceof PotentialRegexEval {
309
309
* Consider using `getARegex()` instead (which tracks the regular expression
310
310
* input back to its source).
311
311
*/
312
- Expr getRegexInput ( ) { result = this . ( PotentialRegexEval ) .getRegexInput ( ) .asExpr ( ) }
312
+ Expr getRegexInput ( ) { result = super .getRegexInput ( ) .asExpr ( ) }
313
313
314
314
/**
315
315
* Gets the input to this call that is the string the regular expression is evaluated on.
316
316
*/
317
- Expr getStringInput ( ) { result = this . ( PotentialRegexEval ) .getStringInput ( ) .asExpr ( ) }
317
+ Expr getStringInput ( ) { result = super .getStringInput ( ) .asExpr ( ) }
318
318
319
319
/**
320
320
* Gets a dataflow node for an options input that might contain parse mode
321
321
* flags (if any).
322
322
*/
323
- DataFlow:: Node getAnOptionsInput ( ) { result = this . ( PotentialRegexEval ) .getAnOptionsInput ( ) }
323
+ DataFlow:: Node getAnOptionsInput ( ) { result = super .getAnOptionsInput ( ) }
324
324
325
325
/**
326
326
* Gets a regular expression value that is evaluated here (if any can be identified).
327
327
*/
328
328
RegExp getARegex ( ) {
329
329
// string literal used directly as a regex
330
- DataFlow:: exprNode ( result ) .( ParsedStringRegex ) .getAParse ( ) =
331
- this .( PotentialRegexEval ) .getRegexInput ( )
330
+ DataFlow:: exprNode ( result ) .( ParsedStringRegex ) .getAParse ( ) = super .getRegexInput ( )
332
331
or
333
332
// string literal -> regex object -> use
334
333
exists ( RegexCreation regexCreation |
335
334
DataFlow:: exprNode ( result ) .( ParsedStringRegex ) .getAParse ( ) = regexCreation .getStringInput ( ) and
336
- RegexUseFlow:: flow ( regexCreation , this . ( PotentialRegexEval ) .getRegexInput ( ) )
335
+ RegexUseFlow:: flow ( regexCreation , super .getRegexInput ( ) )
337
336
)
338
337
}
339
338
@@ -347,8 +346,8 @@ class RegexEval extends CallExpr instanceof PotentialRegexEval {
347
346
any ( RegexAdditionalFlowStep s ) .setsParseMode ( setNode , result , true ) and
348
347
// reaches this eval
349
348
(
350
- RegexParseModeFlow:: flow ( setNode , this . ( PotentialRegexEval ) .getRegexInput ( ) ) or
351
- RegexParseModeFlow:: flow ( setNode , this . ( PotentialRegexEval ) .getAnOptionsInput ( ) )
349
+ RegexParseModeFlow:: flow ( setNode , super .getRegexInput ( ) ) or
350
+ RegexParseModeFlow:: flow ( setNode , super .getAnOptionsInput ( ) )
352
351
)
353
352
)
354
353
}
0 commit comments