Skip to content

Commit f02912b

Browse files
committed
QL: Add VarDef.getAnAccess
1 parent 85403cd commit f02912b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ql/ql/src/codeql_ql/ast/Ast.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,9 @@ class VarDef extends TVarDef, AstNode {
553553

554554
Type getType() { none() }
555555

556+
/** Gets a variable access to this `VarDef` */
557+
VarAccess getAnAccess() { result.getDeclaration() = this }
558+
556559
override string getAPrimaryQlClass() { result = "VarDef" }
557560

558561
override string toString() { result = this.getName() }

0 commit comments

Comments
 (0)