File tree Expand file tree Collapse file tree 2 files changed +396
-158
lines changed
go/ql/lib/semmle/go/controlflow Expand file tree Collapse file tree 2 files changed +396
-158
lines changed Original file line number Diff line number Diff line change 44
55import go
66private import ControlFlowGraphImpl
7+ private import codeql.controlflow.SuccessorType
78
89/** Provides helper predicates for mapping btween CFG nodes and the AST. */
910module ControlFlow {
@@ -40,6 +41,9 @@ module ControlFlow {
4041 /** Gets a node that directly follows this one in the control-flow graph. */
4142 Node getASuccessor ( ) { result = CFG:: succ ( this ) }
4243
44+ /** Gets a node that directly follows this one in the control-flow graph. */
45+ Node getASuccessor ( SuccessorType t ) { result = CFG:: succ ( this , t ) }
46+
4347 /** Gets a node that directly precedes this one in the control-flow graph. */
4448 Node getAPredecessor ( ) { this = result .getASuccessor ( ) }
4549
@@ -350,4 +354,6 @@ module ControlFlow {
350354 }
351355}
352356
357+ class ControlFlowNode = ControlFlow:: Node ;
358+
353359class Write = ControlFlow:: WriteNode ;
You can’t perform that action at this time.
0 commit comments