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 {
6060 * ```
6161 */
6262abstract class RegexEval extends CallExpr {
63- Expr regexInput ;
64- Expr stringInput ;
65-
6663 /**
6764 * Gets the input to this call that is the regular expression being evaluated.
6865 */
69- Expr getRegexInput ( ) { result = regexInput }
66+ abstract Expr getRegexInput ( ) ;
7067
7168 /**
7269 * Gets the input to this call that is the string the regular expression is evaluated on.
7370 */
74- Expr getStringInput ( ) { result = stringInput }
71+ abstract Expr getStringInput ( ) ;
7572
7673 /**
7774 * Gets a regular expression value that is evaluated here (if any can be identified).
@@ -83,6 +80,9 @@ abstract class RegexEval extends CallExpr {
8380 * A call to a function that always evaluates a regular expression.
8481 */
8582private class AlwaysRegexEval extends RegexEval {
83+ Expr regexInput ;
84+ Expr stringInput ;
85+
8686 AlwaysRegexEval ( ) {
8787 this .getStaticTarget ( )
8888 .( Method )
@@ -127,4 +127,8 @@ private class AlwaysRegexEval extends RegexEval {
127127 regexInput = this .getArgument ( 0 ) .getExpr ( ) and
128128 stringInput = this .getQualifier ( )
129129 }
130+
131+ override Expr getRegexInput ( ) { result = regexInput }
132+
133+ override Expr getStringInput ( ) { result = stringInput }
130134}
You can’t perform that action at this time.
0 commit comments