From 030af8eac3f1cc331f1f518b5d0e5c7587cf0791 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Jun 2026 12:45:49 +0000 Subject: [PATCH] Remove dead "send" additional CFG node and unused SendInstruction --- .../semmle/go/controlflow/ControlFlowGraphShared.qll | 5 ----- go/ql/lib/semmle/go/controlflow/IR.qll | 11 ----------- 2 files changed, 16 deletions(-) diff --git a/go/ql/lib/semmle/go/controlflow/ControlFlowGraphShared.qll b/go/ql/lib/semmle/go/controlflow/ControlFlowGraphShared.qll index 47160577aff..6d6cd76f1ac 100644 --- a/go/ql/lib/semmle/go/controlflow/ControlFlowGraphShared.qll +++ b/go/ql/lib/semmle/go/controlflow/ControlFlowGraphShared.qll @@ -574,11 +574,6 @@ module GoCfg { tag = "result-zero-init:" + i.toString() ) or - // Send node - n instanceof Go::SendStmt and - not n = any(Go::CommClause cc).getComm() and - tag = "send" - or // Implicit deref implicitDerefCondition(n) and tag = "implicit-deref" or diff --git a/go/ql/lib/semmle/go/controlflow/IR.qll b/go/ql/lib/semmle/go/controlflow/IR.qll index f1dda341d63..5d51f42d30b 100644 --- a/go/ql/lib/semmle/go/controlflow/IR.qll +++ b/go/ql/lib/semmle/go/controlflow/IR.qll @@ -191,8 +191,6 @@ module IR { or this instanceof ReadResultInstruction and result = "result read" or - this instanceof SendInstruction and result = "send" - or this instanceof InitParameterInstruction and result = "parameter initialization" or this instanceof ReadArgumentInstruction and result = "argument" @@ -1046,15 +1044,6 @@ module IR { override ControlFlow::Root getRoot() { var = result.(FuncDef).getAResultVar() } } - /** An instruction corresponding to a send statement. */ - class SendInstruction extends Instruction { - SendStmt send; - - SendInstruction() { this.isAdditional(send, "send") } - - override ControlFlow::Root getRoot() { result.isRootOf(send) } - } - /** An instruction initializing a parameter to the corresponding argument. */ class InitParameterInstruction extends WriteInstruction { Parameter parm;