From 80d5e27b46885021323addc53026bbedcd913b30 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Tue, 28 Apr 2026 11:03:03 +0200 Subject: [PATCH] C#: Deprecate Ssa::ImplicitEntryDefinition. --- csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll | 4 +++- .../semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll index d29ace056b9..edc7e6a6a89 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll @@ -529,11 +529,13 @@ module Ssa { } /** + * DEPRECATED: Use `SsaParameterInit` or `SsaImplicitEntryDefinition` instead. + * * An SSA definition representing the implicit initialization of a variable * at the beginning of a callable. Either a local scope variable captured by * the callable or a field or property accessed inside the callable. */ - class ImplicitEntryDefinition extends ImplicitDefinition { + deprecated class ImplicitEntryDefinition extends ImplicitDefinition { ImplicitEntryDefinition() { exists(BasicBlock bb, SourceVariable v | this.definesAt(v, bb, -1) and diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll index f581628a79c..7b1d35c6e5a 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll @@ -1430,7 +1430,7 @@ private module ParameterNodes { } /** An implicit entry definition for a captured variable. */ - class SsaCapturedEntryDefinition extends Ssa::ImplicitEntryDefinition { + deprecated class SsaCapturedEntryDefinition extends Ssa::ImplicitEntryDefinition { private LocalScopeVariable v; SsaCapturedEntryDefinition() { this.getSourceVariable().getAssignable() = v } @@ -2011,9 +2011,6 @@ private class FieldOrPropertyRead extends FieldOrPropertyAccess, AssignableRead exists(SsaDefinition def, Ssa::ImplicitDefinition idef | def.getARead() = this and idef = def.getAnUltimateDefinition() - | - idef instanceof Ssa::ImplicitEntryDefinition or - idef instanceof Ssa::ImplicitCallDefinition ) } }