File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
swift/ql/lib/codeql/swift/regex Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -60,18 +60,15 @@ private class ParsedStringRegex extends RegExp, StringLiteralExpr {
60
60
* ```
61
61
*/
62
62
abstract class RegexEval extends CallExpr {
63
- Expr regexInput ;
64
- Expr stringInput ;
65
-
66
63
/**
67
64
* Gets the input to this call that is the regular expression being evaluated.
68
65
*/
69
- Expr getRegexInput ( ) { result = regexInput }
66
+ abstract Expr getRegexInput ( ) ;
70
67
71
68
/**
72
69
* Gets the input to this call that is the string the regular expression is evaluated on.
73
70
*/
74
- Expr getStringInput ( ) { result = stringInput }
71
+ abstract Expr getStringInput ( ) ;
75
72
76
73
/**
77
74
* Gets a regular expression value that is evaluated here (if any can be identified).
@@ -83,6 +80,9 @@ abstract class RegexEval extends CallExpr {
83
80
* A call to a function that always evaluates a regular expression.
84
81
*/
85
82
private class AlwaysRegexEval extends RegexEval {
83
+ Expr regexInput ;
84
+ Expr stringInput ;
85
+
86
86
AlwaysRegexEval ( ) {
87
87
this .getStaticTarget ( )
88
88
.( Method )
@@ -127,4 +127,8 @@ private class AlwaysRegexEval extends RegexEval {
127
127
regexInput = this .getArgument ( 0 ) .getExpr ( ) and
128
128
stringInput = this .getQualifier ( )
129
129
}
130
+
131
+ override Expr getRegexInput ( ) { result = regexInput }
132
+
133
+ override Expr getStringInput ( ) { result = stringInput }
130
134
}
You can’t perform that action at this time.
0 commit comments