mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Swift: We don't need the location components logic inRegExpTerm, at least, not yet.
This commit is contained in:
@@ -207,30 +207,10 @@ private module Impl implements RegexTreeViewSig {
|
||||
*/
|
||||
Location getLocation() { result = re.getLocation() }
|
||||
|
||||
/*
|
||||
* pragma[noinline]
|
||||
* private predicate componentHasLocationInfo(
|
||||
* int i, string filepath, int startline, int startcolumn, int endline, int endcolumn
|
||||
* ) {
|
||||
* re.getComponent(i)
|
||||
* .getLocation()
|
||||
* .hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||
* }
|
||||
*/
|
||||
|
||||
/** Holds if this term is found at the specified location offsets. */
|
||||
predicate hasLocationInfo(
|
||||
string filepath, int startline, int startcolumn, int endline, int endcolumn
|
||||
) {
|
||||
/*
|
||||
* exists(int re_start |
|
||||
* this.componentHasLocationInfo(0, filepath, startline, re_start, _, _) and
|
||||
* this.componentHasLocationInfo(re.getNumberOfComponents() - 1, filepath, _, _, endline, _) and
|
||||
* startcolumn = re_start + start and
|
||||
* endcolumn = re_start + end - 1
|
||||
* )
|
||||
*/
|
||||
|
||||
filepath = re.getFile().getAbsolutePath() and
|
||||
startline = re.getLocation().getStartLine() and
|
||||
startcolumn = re.getLocation().getStartColumn() and
|
||||
|
||||
Reference in New Issue
Block a user