We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 987ca61 commit 5cffa59Copy full SHA for 5cffa59
1 file changed
swift/ql/lib/codeql/swift/regex/Regex.qll
@@ -60,18 +60,15 @@ private class ParsedStringRegex extends RegExp, StringLiteralExpr {
60
* ```
61
*/
62
abstract class RegexEval extends CallExpr {
63
- Expr regexInput;
64
- Expr stringInput;
65
-
66
/**
67
* Gets the input to this call that is the regular expression being evaluated.
68
69
- Expr getRegexInput() { result = regexInput }
+ abstract Expr getRegexInput();
70
71
72
* Gets the input to this call that is the string the regular expression is evaluated on.
73
74
- Expr getStringInput() { result = stringInput }
+ abstract Expr getStringInput();
75
76
77
* 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 {
+ Expr regexInput;
+ Expr stringInput;
+
86
AlwaysRegexEval() {
87
this.getStaticTarget()
88
.(Method)
@@ -127,4 +127,8 @@ private class AlwaysRegexEval extends RegexEval {
127
regexInput = this.getArgument(0).getExpr() and
128
stringInput = this.getQualifier()
129
}
130
131
+ override Expr getRegexInput() { result = regexInput }
132
133
+ override Expr getStringInput() { result = stringInput }
134
0 commit comments