From 31e06bc0a928783833e82c07bd8a835e4b69c621 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Mon, 27 Apr 2026 14:56:52 +0200 Subject: [PATCH] C#: Remove SSA location overrides. --- .../lib/semmle/code/csharp/dataflow/SSA.qll | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll index ed75874b842..39cbf602650 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll @@ -422,9 +422,6 @@ module Ssa { deprecated final predicate isLiveOutRefParameterDefinition(Parameter p) { SsaImpl::isLiveOutRefParameterDefinition(this, p) } - - /** Gets the location of this SSA definition. */ - override Location getLocation() { none() } } /** @@ -509,8 +506,6 @@ module Ssa { override Element getElement() { result = ad.getElement() } override string toString() { result = "SSA def(" + this.getSourceVariable() + ")" } - - override Location getLocation() { result = ad.getLocation() } } /** @@ -556,8 +551,6 @@ module Ssa { then result = "SSA capture def(" + this.getSourceVariable() + ")" else result = "SSA entry def(" + this.getSourceVariable() + ")" } - - override Location getLocation() { result = this.getCallable().getLocation() } } deprecated class ImplicitParameterDefinition = ParameterDefinition; @@ -625,8 +618,6 @@ module Ssa { } override string toString() { result = "SSA call def(" + this.getSourceVariable() + ")" } - - override Location getLocation() { result = this.getCall().getLocation() } } /** @@ -649,8 +640,6 @@ module Ssa { final Definition getQualifierDefinition() { result = q } override string toString() { result = "SSA qualifier def(" + this.getSourceVariable() + ")" } - - override Location getLocation() { result = this.getQualifierDefinition().getLocation() } } /** @@ -689,16 +678,6 @@ module Ssa { } override string toString() { result = "SSA phi(" + this.getSourceVariable() + ")" } - - /* - * The location of a phi node is the same as the location of the first node - * in the basic block in which it is defined. - * - * Strictly speaking, the node is *before* the first node, but such a location - * does not exist in the source program. - */ - - override Location getLocation() { result = this.getBasicBlock().getFirstNode().getLocation() } } /**