Skip to content

Commit 030af8e

Browse files
authored
Remove dead "send" additional CFG node and unused SendInstruction
1 parent 6fa89ef commit 030af8e

2 files changed

Lines changed: 0 additions & 16 deletions

File tree

go/ql/lib/semmle/go/controlflow/ControlFlowGraphShared.qll

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -574,11 +574,6 @@ module GoCfg {
574574
tag = "result-zero-init:" + i.toString()
575575
)
576576
or
577-
// Send node
578-
n instanceof Go::SendStmt and
579-
not n = any(Go::CommClause cc).getComm() and
580-
tag = "send"
581-
or
582577
// Implicit deref
583578
implicitDerefCondition(n) and tag = "implicit-deref"
584579
or

go/ql/lib/semmle/go/controlflow/IR.qll

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,6 @@ module IR {
191191
or
192192
this instanceof ReadResultInstruction and result = "result read"
193193
or
194-
this instanceof SendInstruction and result = "send"
195-
or
196194
this instanceof InitParameterInstruction and result = "parameter initialization"
197195
or
198196
this instanceof ReadArgumentInstruction and result = "argument"
@@ -1046,15 +1044,6 @@ module IR {
10461044
override ControlFlow::Root getRoot() { var = result.(FuncDef).getAResultVar() }
10471045
}
10481046

1049-
/** An instruction corresponding to a send statement. */
1050-
class SendInstruction extends Instruction {
1051-
SendStmt send;
1052-
1053-
SendInstruction() { this.isAdditional(send, "send") }
1054-
1055-
override ControlFlow::Root getRoot() { result.isRootOf(send) }
1056-
}
1057-
10581047
/** An instruction initializing a parameter to the corresponding argument. */
10591048
class InitParameterInstruction extends WriteInstruction {
10601049
Parameter parm;

0 commit comments

Comments
 (0)