Skip to content

Commit d8002a0

Browse files
committed
Clean up code in basicLocalFlowStep
No changes in functionality.
1 parent 06404d8 commit d8002a0

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
@@ -69,22 +69,22 @@ predicate basicLocalFlowStep(Node nodeFrom, Node nodeTo) {
6969
exists(IR::Instruction pred, SsaExplicitDefinition succ |
7070
succ.getRhs() = pred and
7171
nodeFrom = instructionNode(pred) and
72-
nodeTo = ssaNode(succ)
72+
nodeTo = ssaNode(succ.getVariable())
7373
)
7474
or
7575
// SSA defn -> SSA capture
7676
exists(SsaExplicitDefinition pred, SsaVariableCapture succ |
7777
// Check: should these flow from PHIs as well? Perhaps they should be included
7878
// in the use-use graph?
79-
succ.(SsaVariableCapture).getSourceVariable() = pred.(SsaExplicitDefinition).getSourceVariable()
79+
succ.getSourceVariable() = pred.getSourceVariable()
8080
|
81-
nodeFrom = ssaNode(pred) and
82-
nodeTo = ssaNode(succ)
81+
nodeFrom = ssaNode(pred.getVariable()) and
82+
nodeTo = ssaNode(succ.getVariable())
8383
)
8484
or
8585
// SSA defn -> first SSA use
8686
exists(SsaExplicitDefinition pred, IR::Instruction succ | succ = pred.getAFirstUse() |
87-
nodeFrom = ssaNode(pred) and
87+
nodeFrom = ssaNode(pred.getVariable()) and
8888
nodeTo = instructionNode(succ)
8989
)
9090
or

0 commit comments

Comments
 (0)