Skip to content

Commit dcd8810

Browse files
committed
Swift: Minor corrections, update parse.expected.
1 parent 446416f commit dcd8810

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

swift/ql/lib/codeql/swift/regex/Regex.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ abstract class PotentialRegexEval extends CallExpr {
371371
DataFlow::Node getAnOptionsInput() { none() }
372372

373373
/**
374-
* Holds if this instance actually evaluated a regular expression. If this
374+
* Holds if this instance actually evaluates a regular expression. If this
375375
* does not hold, a `RegexEval` is not created for this `PotentialRegexEval`.
376376
*
377377
* This mechanism exists so that we have something to track flow of options
@@ -475,7 +475,7 @@ private class NSStringCompareOptionsPotentialRegexEval extends PotentialRegexEva
475475

476476
override predicate doesEvaluate() {
477477
// check there is flow from a `NSString.CompareOptions.regularExpression` value to an `options` argument;
478-
// if it isn't, the input won't be interpretted as a regular expression.
478+
// if there isn't, the input won't be interpretted as a regular expression.
479479
exists(MemberRefExpr sourceValue |
480480
sourceValue
481481
.getMember()

swift/ql/test/library-tests/regex/parse.expected

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6334,11 +6334,21 @@ regex.swift:
63346334
# 129| [RegExpStar] .*
63356335
#-----| 0 -> [RegExpDot] .
63366336

6337+
# 130| [RegExpDot] .
6338+
6339+
# 130| [RegExpStar] .*
6340+
#-----| 0 -> [RegExpDot] .
6341+
63376342
# 131| [RegExpDot] .
63386343

63396344
# 131| [RegExpStar] .*
63406345
#-----| 0 -> [RegExpDot] .
63416346

6347+
# 132| [RegExpDot] .
6348+
6349+
# 132| [RegExpStar] .*
6350+
#-----| 0 -> [RegExpDot] .
6351+
63426352
# 136| [RegExpDot] .
63436353

63446354
# 136| [RegExpStar] .*
@@ -6364,11 +6374,21 @@ regex.swift:
63646374
# 153| [RegExpStar] .*
63656375
#-----| 0 -> [RegExpDot] .
63666376

6377+
# 154| [RegExpDot] .
6378+
6379+
# 154| [RegExpStar] .*
6380+
#-----| 0 -> [RegExpDot] .
6381+
63676382
# 155| [RegExpDot] .
63686383

63696384
# 155| [RegExpStar] .*
63706385
#-----| 0 -> [RegExpDot] .
63716386

6387+
# 156| [RegExpDot] .
6388+
6389+
# 156| [RegExpStar] .*
6390+
#-----| 0 -> [RegExpDot] .
6391+
63726392
# 160| [RegExpDot] .
63736393

63746394
# 160| [RegExpStar] .*

0 commit comments

Comments
 (0)