Skip to content

Commit

Permalink
Swift: Suggestions from review.
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffw0 committed Aug 23, 2023
1 parent 15c49ee commit 46fc1fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions swift/ql/lib/codeql/swift/regex/Regex.qll
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ abstract class RegexPatternSource extends DataFlow::Node {
* a `Regex`. This is a simple wrapper to make that happen.
*/
private class RegexFromRegexPatternSource extends RegExp {
RegexPatternSource node;

RegexFromRegexPatternSource() { this = node.asExpr() }
RegexFromRegexPatternSource() { this = any(RegexPatternSource node).asExpr() }
}

/**
Expand Down
2 changes: 1 addition & 1 deletion swift/ql/lib/codeql/swift/security/regex/HostnameRegex.qll
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ private import codeql.regex.HostnameRegexp as Shared
/**
* An implementation of the signature that allows the Hostname analysis to run.
*/
module Impl implements Shared::HostnameRegexpSig<TreeImpl> {
private module Impl implements Shared::HostnameRegexpSig<TreeImpl> {
class DataFlowNode = DataFlow::Node;

class RegExpPatternSource = Regex::RegexPatternSource;
Expand Down

0 comments on commit 46fc1fd

Please sign in to comment.