Python: Use NiceLocationExpr::hasLocationInfo for ide jump-to-def

This commit is contained in:
Jason Reed
2020-05-04 11:36:54 -04:00
parent b0f72ebb56
commit c34fa840a2

View File

@@ -12,7 +12,8 @@ import DefinitionTracking
external string selectedSourceFile();
from NiceLocationExpr use, Definition defn, string kind
where defn = definitionOf(use, kind)
and use.(Expr).getLocation().getFile() = getEncodedFile(selectedSourceFile())
from NiceLocationExpr use, Definition defn, string kind, string f
where defn = definitionOf(use, kind)
and use.hasLocationInfo(f, _, _, _, _)
and getEncodedFile(selectedSourceFile()).getAbsolutePath() = f
select use, defn, kind