From b20aa3fb077ff3e6d38e95cedb0cd9b3309ba53b Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Fri, 28 May 2021 09:46:03 +0200 Subject: [PATCH] Add variables to jump-to-def queries --- ql/src/codeql_ql/ast/Ast.qll | 2 + ql/src/ide-contextual-queries/Definitions.qll | 60 ++++++++++++++ .../localDefinitions.ql | 57 +------------ .../ide-contextual-queries/localReferences.ql | 56 +------------ ql/test/printAst/printAst.expected | 80 +++++++++---------- 5 files changed, 110 insertions(+), 145 deletions(-) create mode 100644 ql/src/ide-contextual-queries/Definitions.qll diff --git a/ql/src/codeql_ql/ast/Ast.qll b/ql/src/codeql_ql/ast/Ast.qll index 87a24731fa7..b97cf137fca 100644 --- a/ql/src/codeql_ql/ast/Ast.qll +++ b/ql/src/codeql_ql/ast/Ast.qll @@ -1181,6 +1181,8 @@ class VarAccess extends Identifier { /** Gets the accessed variable. */ VarDecl getDeclaration() { result = decl } + + override string getAPrimaryQlClass() { result = "VarAccess" } } /** A `not` formula. */ diff --git a/ql/src/ide-contextual-queries/Definitions.qll b/ql/src/ide-contextual-queries/Definitions.qll new file mode 100644 index 00000000000..bde1f3baa83 --- /dev/null +++ b/ql/src/ide-contextual-queries/Definitions.qll @@ -0,0 +1,60 @@ +import ql +import codeql_ql.ast.internal.Module +import codeql.IDEContextual + +private newtype TLoc = + TAst(AstNode n) or + TFileOrModule(FileOrModule m) + +class Loc extends TLoc { + string toString() { result = "" } + + AstNode asAst() { this = TAst(result) } + + FileOrModule asMod() { this = TFileOrModule(result) } + + File getFile() { this.hasLocationInfo(result.getAbsolutePath(), _, _, _, _) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + exists(AstNode n | this = TAst(n) | + n.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + ) + or + exists(FileOrModule m | this = TFileOrModule(m) | + m.hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + ) + } +} + +private predicate resolveModule(ModuleRef ref, FileOrModule target, string kind) { + target = ref.getResolvedModule() and + kind = "module" +} + +private predicate resolveType(TypeExpr ref, AstNode target, string kind) { + target = ref.getResolvedType().getDeclaration() and + kind = "type" +} + +private predicate resolvePredicate(PredicateExpr ref, Predicate target, string kind) { + target = ref.getResolvedPredicate() and + kind = "predicate" +} + +private predicate resolveVar(VarAccess va, VarDecl decl, string kind) { + decl = va.getDeclaration() and + kind = "variable" +} + +cached +predicate resolve(Loc ref, Loc target, string kind) { + resolveModule(ref.asAst(), target.asMod(), kind) + or + resolveType(ref.asAst(), target.asAst(), kind) + or + resolvePredicate(ref.asAst(), target.asAst(), kind) + or + resolveVar(ref.asAst(), target.asAst(), kind) +} diff --git a/ql/src/ide-contextual-queries/localDefinitions.ql b/ql/src/ide-contextual-queries/localDefinitions.ql index cdd6602d473..ab7364f8101 100644 --- a/ql/src/ide-contextual-queries/localDefinitions.ql +++ b/ql/src/ide-contextual-queries/localDefinitions.ql @@ -8,62 +8,13 @@ */ import ql -import codeql_ql.ast.internal.Module -import codeql_ql.ast.internal.Type +import Definitions import codeql.IDEContextual external string selectedSourceFile(); -newtype TLoc = - TAst(AstNode n) or - TFileOrModule(FileOrModule m) - -class Loc extends TLoc { - string toString() { result = "" } - - AstNode asAst() { this = TAst(result) } - - FileOrModule asMod() { this = TFileOrModule(result) } - - predicate hasLocationInfo( - string filepath, int startline, int startcolumn, int endline, int endcolumn - ) { - exists(AstNode n | this = TAst(n) | - n.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) - ) - or - exists(FileOrModule m | this = TFileOrModule(m) | - m.hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) - ) - } -} - -predicate resolveModule(ModuleRef ref, FileOrModule target, string kind) { - target = ref.getResolvedModule() and - kind = "module" and - ref.getLocation().getFile() = getFileBySourceArchiveName(selectedSourceFile()) -} - -predicate resolveType(TypeExpr ref, AstNode target, string kind) { - target = ref.getResolvedType().getDeclaration() and - kind = "type" and - ref.getLocation().getFile() = getFileBySourceArchiveName(selectedSourceFile()) -} - -predicate resolvePredicate(PredicateExpr ref, Predicate target, string kind) { - target = ref.getResolvedPredicate() and - kind = "predicate" and - ref.getLocation().getFile() = getFileBySourceArchiveName(selectedSourceFile()) -} - -predicate resolve(Loc ref, Loc target, string kind) { - resolveModule(ref.asAst(), target.asMod(), kind) - or - resolveType(ref.asAst(), target.asAst(), kind) - or - resolvePredicate(ref.asAst(), target.asAst(), kind) -} - from Loc ref, Loc target, string kind -where resolve(ref, target, kind) +where + resolve(ref, target, kind) and + ref.getFile() = getFileBySourceArchiveName(selectedSourceFile()) select ref, target, kind diff --git a/ql/src/ide-contextual-queries/localReferences.ql b/ql/src/ide-contextual-queries/localReferences.ql index a6b23ee187d..b637f9aa35c 100644 --- a/ql/src/ide-contextual-queries/localReferences.ql +++ b/ql/src/ide-contextual-queries/localReferences.ql @@ -8,61 +8,13 @@ */ import ql -import codeql_ql.ast.internal.Module +import Definitions import codeql.IDEContextual external string selectedSourceFile(); -newtype TLoc = - TAst(AstNode n) or - TFileOrModule(FileOrModule m) - -class Loc extends TLoc { - string toString() { result = "" } - - AstNode asAst() { this = TAst(result) } - - FileOrModule asMod() { this = TFileOrModule(result) } - - predicate hasLocationInfo( - string filepath, int startline, int startcolumn, int endline, int endcolumn - ) { - exists(AstNode n | this = TAst(n) | - n.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) - ) - or - exists(FileOrModule m | this = TFileOrModule(m) | - m.hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) - ) - } -} - -predicate resolveModule(ModuleRef ref, FileOrModule target, string kind) { - target = ref.getResolvedModule() and - kind = "module" and - ref.getLocation().getFile() = getFileBySourceArchiveName(selectedSourceFile()) -} - -predicate resolveType(TypeExpr ref, AstNode target, string kind) { - target = ref.getResolvedType().getDeclaration() and - kind = "type" and - ref.getLocation().getFile() = getFileBySourceArchiveName(selectedSourceFile()) -} - -predicate resolvePredicate(PredicateExpr ref, Predicate target, string kind) { - target = ref.getResolvedPredicate() and - kind = "predicate" and - ref.getLocation().getFile() = getFileBySourceArchiveName(selectedSourceFile()) -} - -predicate resolve(Loc ref, Loc target, string kind) { - resolveModule(ref.asAst(), target.asMod(), kind) - or - resolveType(ref.asAst(), target.asAst(), kind) - or - resolvePredicate(ref.asAst(), target.asAst(), kind) -} - from Loc ref, Loc target, string kind -where resolve(ref, target, kind) +where + resolve(ref, target, kind) and + target.getFile() = getFileBySourceArchiveName(selectedSourceFile()) select ref, target, kind diff --git a/ql/test/printAst/printAst.expected b/ql/test/printAst/printAst.expected index 03a0abda214..d8ccba97449 100644 --- a/ql/test/printAst/printAst.expected +++ b/ql/test/printAst/printAst.expected @@ -35,8 +35,8 @@ nodes | Foo.qll:9:21:9:23 | TypeExpr | semmle.order | 17 | | Foo.qll:9:21:9:25 | VarDecl | semmle.label | [VarDecl] VarDecl | | Foo.qll:9:21:9:25 | VarDecl | semmle.order | 17 | -| Foo.qll:10:3:10:3 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:10:3:10:3 | Identifier | semmle.order | 19 | +| Foo.qll:10:3:10:3 | VarAccess | semmle.label | [VarAccess] VarAccess | +| Foo.qll:10:3:10:3 | VarAccess | semmle.order | 19 | | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.order | 19 | | Foo.qll:10:5:10:5 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | @@ -49,8 +49,8 @@ nodes | Foo.qll:10:15:10:17 | TypeExpr | semmle.order | 24 | | Foo.qll:10:15:10:23 | VarDecl | semmle.label | [VarDecl] VarDecl | | Foo.qll:10:15:10:23 | VarDecl | semmle.order | 24 | -| Foo.qll:10:27:10:31 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:10:27:10:31 | Identifier | semmle.order | 26 | +| Foo.qll:10:27:10:31 | VarAccess | semmle.label | [VarAccess] VarAccess | +| Foo.qll:10:27:10:31 | VarAccess | semmle.order | 26 | | Foo.qll:10:27:10:42 | MemberCall | semmle.label | [MemberCall] MemberCall | | Foo.qll:10:27:10:42 | MemberCall | semmle.order | 26 | | Foo.qll:10:27:10:50 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | @@ -61,10 +61,10 @@ nodes | Foo.qll:10:46:10:50 | String | semmle.order | 30 | | Foo.qll:10:54:10:58 | AsExpr | semmle.label | [AsExpr] AsExpr | | Foo.qll:10:54:10:58 | AsExpr | semmle.order | 31 | -| Foo.qll:10:54:10:58 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:10:54:10:58 | Identifier | semmle.order | 31 | -| Foo.qll:10:69:10:73 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:10:69:10:73 | Identifier | semmle.order | 33 | +| Foo.qll:10:54:10:58 | VarAccess | semmle.label | [VarAccess] VarAccess | +| Foo.qll:10:54:10:58 | VarAccess | semmle.order | 31 | +| Foo.qll:10:69:10:73 | VarAccess | semmle.label | [VarAccess] VarAccess | +| Foo.qll:10:69:10:73 | VarAccess | semmle.order | 33 | | Foo.qll:10:69:10:84 | MemberCall | semmle.label | [MemberCall] MemberCall | | Foo.qll:10:69:10:84 | MemberCall | semmle.order | 33 | | Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.label | [ClasslessPredicate] ClasslessPredicate | @@ -85,16 +85,16 @@ nodes | Foo.qll:14:3:22:16 | Disjunction | semmle.order | 38 | | Foo.qll:14:3:24:23 | Disjunction | semmle.label | [Disjunction] Disjunction | | Foo.qll:14:3:24:23 | Disjunction | semmle.order | 38 | -| Foo.qll:14:9:14:9 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:14:9:14:9 | Identifier | semmle.order | 44 | +| Foo.qll:14:9:14:9 | VarAccess | semmle.label | [VarAccess] VarAccess | +| Foo.qll:14:9:14:9 | VarAccess | semmle.order | 44 | | Foo.qll:16:3:16:7 | String | semmle.label | [String] String | | Foo.qll:16:3:16:7 | String | semmle.order | 45 | | Foo.qll:16:3:16:29 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | | Foo.qll:16:3:16:29 | ComparisonFormula | semmle.order | 45 | | Foo.qll:16:9:16:9 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | | Foo.qll:16:9:16:9 | ComparisonOp | semmle.order | 47 | -| Foo.qll:16:11:16:11 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:16:11:16:11 | Identifier | semmle.order | 48 | +| Foo.qll:16:11:16:11 | VarAccess | semmle.label | [VarAccess] VarAccess | +| Foo.qll:16:11:16:11 | VarAccess | semmle.order | 48 | | Foo.qll:16:11:16:29 | MemberCall | semmle.label | [MemberCall] MemberCall | | Foo.qll:16:11:16:29 | MemberCall | semmle.order | 48 | | Foo.qll:16:22:16:22 | Integer | semmle.label | [Integer] Integer | @@ -103,8 +103,8 @@ nodes | Foo.qll:16:25:16:25 | Integer | semmle.order | 51 | | Foo.qll:16:28:16:28 | Integer | semmle.label | [Integer] Integer | | Foo.qll:16:28:16:28 | Integer | semmle.order | 52 | -| Foo.qll:18:3:18:3 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:18:3:18:3 | Identifier | semmle.order | 53 | +| Foo.qll:18:3:18:3 | VarAccess | semmle.label | [VarAccess] VarAccess | +| Foo.qll:18:3:18:3 | VarAccess | semmle.order | 53 | | Foo.qll:18:3:18:9 | InlineCast | semmle.label | [InlineCast] InlineCast | | Foo.qll:18:3:18:9 | InlineCast | semmle.order | 53 | | Foo.qll:18:3:18:20 | MemberCall | semmle.label | [MemberCall] MemberCall | @@ -117,8 +117,8 @@ nodes | Foo.qll:18:22:18:22 | ComparisonOp | semmle.order | 58 | | Foo.qll:18:24:18:28 | String | semmle.label | [String] String | | Foo.qll:18:24:18:28 | String | semmle.order | 59 | -| Foo.qll:20:3:20:3 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:20:3:20:3 | Identifier | semmle.order | 60 | +| Foo.qll:20:3:20:3 | VarAccess | semmle.label | [VarAccess] VarAccess | +| Foo.qll:20:3:20:3 | VarAccess | semmle.order | 60 | | Foo.qll:20:3:20:9 | InlineCast | semmle.label | [InlineCast] InlineCast | | Foo.qll:20:3:20:9 | InlineCast | semmle.order | 60 | | Foo.qll:20:3:20:13 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | @@ -127,10 +127,10 @@ nodes | Foo.qll:20:6:20:8 | TypeExpr | semmle.order | 63 | | Foo.qll:20:11:20:11 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | | Foo.qll:20:11:20:11 | ComparisonOp | semmle.order | 64 | -| Foo.qll:20:13:20:13 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:20:13:20:13 | Identifier | semmle.order | 65 | -| Foo.qll:22:3:22:3 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:22:3:22:3 | Identifier | semmle.order | 66 | +| Foo.qll:20:13:20:13 | VarAccess | semmle.label | [VarAccess] VarAccess | +| Foo.qll:20:13:20:13 | VarAccess | semmle.order | 65 | +| Foo.qll:22:3:22:3 | VarAccess | semmle.label | [VarAccess] VarAccess | +| Foo.qll:22:3:22:3 | VarAccess | semmle.order | 66 | | Foo.qll:22:3:22:16 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | | Foo.qll:22:3:22:16 | ComparisonFormula | semmle.order | 66 | | Foo.qll:22:5:22:5 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | @@ -204,8 +204,8 @@ edges | Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.order | 19 | | Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | TypeExpr | semmle.label | 1 | | Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | TypeExpr | semmle.order | 17 | -| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:3:10:3 | Identifier | semmle.label | 1 | -| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:3:10:3 | Identifier | semmle.order | 19 | +| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:3:10:3 | VarAccess | semmle.label | 1 | +| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:3:10:3 | VarAccess | semmle.order | 19 | | Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:5:10:5 | ComparisonOp | semmle.label | 2 | | Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:5:10:5 | ComparisonOp | semmle.order | 21 | | Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:7:10:85 | Rank | semmle.label | 3 | @@ -222,26 +222,26 @@ edges | Foo.qll:10:7:10:85 | Rank | Foo.qll:10:69:10:84 | MemberCall | semmle.order | 33 | | Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | TypeExpr | semmle.label | 1 | | Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | TypeExpr | semmle.order | 24 | -| Foo.qll:10:27:10:42 | MemberCall | Foo.qll:10:27:10:31 | Identifier | semmle.label | 1 | -| Foo.qll:10:27:10:42 | MemberCall | Foo.qll:10:27:10:31 | Identifier | semmle.order | 26 | +| Foo.qll:10:27:10:42 | MemberCall | Foo.qll:10:27:10:31 | VarAccess | semmle.label | 1 | +| Foo.qll:10:27:10:42 | MemberCall | Foo.qll:10:27:10:31 | VarAccess | semmle.order | 26 | | Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:27:10:42 | MemberCall | semmle.label | 1 | | Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:27:10:42 | MemberCall | semmle.order | 26 | | Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:44:10:44 | ComparisonOp | semmle.label | 2 | | Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:44:10:44 | ComparisonOp | semmle.order | 29 | | Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:46:10:50 | String | semmle.label | 3 | | Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:46:10:50 | String | semmle.order | 30 | -| Foo.qll:10:54:10:58 | AsExpr | Foo.qll:10:54:10:58 | Identifier | semmle.label | 1 | -| Foo.qll:10:54:10:58 | AsExpr | Foo.qll:10:54:10:58 | Identifier | semmle.order | 31 | -| Foo.qll:10:69:10:84 | MemberCall | Foo.qll:10:69:10:73 | Identifier | semmle.label | 1 | -| Foo.qll:10:69:10:84 | MemberCall | Foo.qll:10:69:10:73 | Identifier | semmle.order | 33 | +| Foo.qll:10:54:10:58 | AsExpr | Foo.qll:10:54:10:58 | VarAccess | semmle.label | 1 | +| Foo.qll:10:54:10:58 | AsExpr | Foo.qll:10:54:10:58 | VarAccess | semmle.order | 31 | +| Foo.qll:10:69:10:84 | MemberCall | Foo.qll:10:69:10:73 | VarAccess | semmle.label | 1 | +| Foo.qll:10:69:10:84 | MemberCall | Foo.qll:10:69:10:73 | VarAccess | semmle.order | 33 | | Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:13:17:13:21 | VarDecl | semmle.label | 1 | | Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:13:17:13:21 | VarDecl | semmle.order | 36 | | Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:23 | Disjunction | semmle.label | 2 | | Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:23 | Disjunction | semmle.order | 38 | | Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | TypeExpr | semmle.label | 1 | | Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | TypeExpr | semmle.order | 36 | -| Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | Identifier | semmle.label | 1 | -| Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | Identifier | semmle.order | 44 | +| Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | VarAccess | semmle.label | 1 | +| Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | VarAccess | semmle.order | 44 | | Foo.qll:14:3:16:29 | Disjunction | Foo.qll:14:3:14:10 | PredicateCall | semmle.label | 1 | | Foo.qll:14:3:16:29 | Disjunction | Foo.qll:14:3:14:10 | PredicateCall | semmle.order | 38 | | Foo.qll:14:3:16:29 | Disjunction | Foo.qll:16:3:16:29 | ComparisonFormula | semmle.label | 2 | @@ -268,16 +268,16 @@ edges | Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:9:16:9 | ComparisonOp | semmle.order | 47 | | Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:11:16:29 | MemberCall | semmle.label | 3 | | Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:11:16:29 | MemberCall | semmle.order | 48 | -| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:11:16:11 | Identifier | semmle.label | 1 | -| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:11:16:11 | Identifier | semmle.order | 48 | +| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:11:16:11 | VarAccess | semmle.label | 1 | +| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:11:16:11 | VarAccess | semmle.order | 48 | | Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:22:16:22 | Integer | semmle.label | 2 | | Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:22:16:22 | Integer | semmle.order | 50 | | Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:25:16:25 | Integer | semmle.label | 3 | | Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:25:16:25 | Integer | semmle.order | 51 | | Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:28:16:28 | Integer | semmle.label | 4 | | Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:28:16:28 | Integer | semmle.order | 52 | -| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | Identifier | semmle.label | 1 | -| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | Identifier | semmle.order | 53 | +| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | VarAccess | semmle.label | 1 | +| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | VarAccess | semmle.order | 53 | | Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | TypeExpr | semmle.label | 2 | | Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | TypeExpr | semmle.order | 57 | | Foo.qll:18:3:18:20 | MemberCall | Foo.qll:18:3:18:9 | InlineCast | semmle.label | 1 | @@ -288,18 +288,18 @@ edges | Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:22:18:22 | ComparisonOp | semmle.order | 58 | | Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:24:18:28 | String | semmle.label | 3 | | Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:24:18:28 | String | semmle.order | 59 | -| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | Identifier | semmle.label | 1 | -| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | Identifier | semmle.order | 60 | +| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | VarAccess | semmle.label | 1 | +| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | VarAccess | semmle.order | 60 | | Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | TypeExpr | semmle.label | 2 | | Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | TypeExpr | semmle.order | 63 | | Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:3:20:9 | InlineCast | semmle.label | 1 | | Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:3:20:9 | InlineCast | semmle.order | 60 | | Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:11:20:11 | ComparisonOp | semmle.label | 2 | | Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:11:20:11 | ComparisonOp | semmle.order | 64 | -| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:13:20:13 | Identifier | semmle.label | 3 | -| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:13:20:13 | Identifier | semmle.order | 65 | -| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:3:22:3 | Identifier | semmle.label | 1 | -| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:3:22:3 | Identifier | semmle.order | 66 | +| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:13:20:13 | VarAccess | semmle.label | 3 | +| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:13:20:13 | VarAccess | semmle.order | 65 | +| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:3:22:3 | VarAccess | semmle.label | 1 | +| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:3:22:3 | VarAccess | semmle.order | 66 | | Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:5:22:5 | ComparisonOp | semmle.label | 2 | | Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:5:22:5 | ComparisonOp | semmle.order | 68 | | Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:7:22:16 | Aggregate[any] | semmle.label | 3 |