Skip to content

Commit c34fa84

Browse files
committed
Python: Use NiceLocationExpr::hasLocationInfo for ide jump-to-def
1 parent b0f72eb commit c34fa84

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/ql/src/analysis/LocalDefinitions.ql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import DefinitionTracking
1212

1313
external string selectedSourceFile();
1414

15-
from NiceLocationExpr use, Definition defn, string kind
16-
where defn = definitionOf(use, kind)
17-
and use.(Expr).getLocation().getFile() = getEncodedFile(selectedSourceFile())
15+
from NiceLocationExpr use, Definition defn, string kind, string f
16+
where defn = definitionOf(use, kind)
17+
and use.hasLocationInfo(f, _, _, _, _)
18+
and getEncodedFile(selectedSourceFile()).getAbsolutePath() = f
1819
select use, defn, kind

0 commit comments

Comments
 (0)