Skip to content

Commit 1cc49af

Browse files
committed
Dataflow: Address review comments.
1 parent accc73d commit 1cc49af

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2486,6 +2486,11 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
24862486
callEdgeReturn(call, c, _, _, _, _, _)
24872487
}
24882488

2489+
/**
2490+
* INTERNAL: Only for debugging.
2491+
*
2492+
* Provides a graph representation of the data flow in this stage suitable for use in a `path-problem` query.
2493+
*/
24892494
additional module Graph {
24902495
private newtype TStagePathNode =
24912496
TStagePathNodeMid(
@@ -2503,6 +2508,9 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
25032508

25042509
abstract Location getLocation();
25052510

2511+
/** Gets the corresponding `Node`, if any. */
2512+
Node getNode() { none() }
2513+
25062514
predicate isSource() { none() }
25072515

25082516
predicate isSink() { none() }
@@ -2545,6 +2553,8 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
25452553

25462554
override Location getLocation() { result = node.getLocation() }
25472555

2556+
override Node getNode() { result = node.asNode() }
2557+
25482558
override predicate isSource() {
25492559
sourceNode(node, state) and
25502560
(if hasSourceCallCtx() then cc = ccSomeCall() else cc = ccNone()) and

0 commit comments

Comments
 (0)