Skip to content

Commit 5a99007

Browse files
committed
Swift: We don't need the location components logic inRegExpTerm, at least, not yet.
1 parent e127030 commit 5a99007

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -207,30 +207,10 @@ private module Impl implements RegexTreeViewSig {
207207
*/
208208
Location getLocation() { result = re.getLocation() }
209209

210-
/*
211-
* pragma[noinline]
212-
* private predicate componentHasLocationInfo(
213-
* int i, string filepath, int startline, int startcolumn, int endline, int endcolumn
214-
* ) {
215-
* re.getComponent(i)
216-
* .getLocation()
217-
* .hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
218-
* }
219-
*/
220-
221210
/** Holds if this term is found at the specified location offsets. */
222211
predicate hasLocationInfo(
223212
string filepath, int startline, int startcolumn, int endline, int endcolumn
224213
) {
225-
/*
226-
* exists(int re_start |
227-
* this.componentHasLocationInfo(0, filepath, startline, re_start, _, _) and
228-
* this.componentHasLocationInfo(re.getNumberOfComponents() - 1, filepath, _, _, endline, _) and
229-
* startcolumn = re_start + start and
230-
* endcolumn = re_start + end - 1
231-
* )
232-
*/
233-
234214
filepath = re.getFile().getAbsolutePath() and
235215
startline = re.getLocation().getStartLine() and
236216
startcolumn = re.getLocation().getStartColumn() and

0 commit comments

Comments
 (0)