Skip to content

Commit e935001

Browse files
committed
Clean up code in basicLocalFlowStep
No changes in functionality.
1 parent df98644 commit e935001

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

go/ql/lib/semmle/go/dataflow/internal/DataFlowPrivate.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,22 @@ predicate basicLocalFlowStep(Node nodeFrom, Node nodeTo) {
6868
exists(IR::Instruction pred, SsaExplicitDefinition succ |
6969
succ.getRhs() = pred and
7070
nodeFrom = instructionNode(pred) and
71-
nodeTo = ssaNode(succ)
71+
nodeTo = ssaNode(succ.getVariable())
7272
)
7373
or
7474
// SSA defn -> SSA capture
7575
exists(SsaExplicitDefinition pred, SsaVariableCapture succ |
7676
// Check: should these flow from PHIs as well? Perhaps they should be included
7777
// in the use-use graph?
78-
succ.(SsaVariableCapture).getSourceVariable() = pred.(SsaExplicitDefinition).getSourceVariable()
78+
succ.getSourceVariable() = pred.getSourceVariable()
7979
|
80-
nodeFrom = ssaNode(pred) and
81-
nodeTo = ssaNode(succ)
80+
nodeFrom = ssaNode(pred.getVariable()) and
81+
nodeTo = ssaNode(succ.getVariable())
8282
)
8383
or
8484
// SSA defn -> first SSA use
8585
exists(SsaExplicitDefinition pred, IR::Instruction succ | succ = pred.getAFirstUse() |
86-
nodeFrom = ssaNode(pred) and
86+
nodeFrom = ssaNode(pred.getVariable()) and
8787
nodeTo = instructionNode(succ)
8888
)
8989
or

0 commit comments

Comments
 (0)