From 65f647a8c0221cb305bff37e712ed1e38f5d4d52 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Mon, 27 Apr 2026 15:07:51 +0200 Subject: [PATCH] C#: Replace Ssa::UncertainDefinition with SsaUncertainWrite. --- csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll | 6 ++++-- .../ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll index 81211505045..d29ace056b9 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll @@ -358,7 +358,7 @@ module Ssa { */ private Definition getAPhiInputOrPriorDefinition() { result = this.(SsaPhiDefinition).getAnInput() or - result = this.(UncertainDefinition).getPriorDefinition() + result = this.(SsaUncertainWrite).getPriorDefinition() } /** @@ -686,12 +686,14 @@ module Ssa { } /** + * DEPRECATED: Use `SsaUncertainWrite` instead. + * * An SSA definition that represents an uncertain update of the underlying * assignable. Either an explicit update that is uncertain (`ref` assignments * need not be certain), an implicit non-local update via a call, or an * uncertain update of the qualifier. */ - class UncertainDefinition extends Definition, SsaImpl::UncertainWriteDefinition { + deprecated class UncertainDefinition extends Definition, SsaImpl::UncertainWriteDefinition { /** * Gets the immediately preceding definition. Since this update is uncertain, * the value from the preceding definition might still be valid. diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll index 74bc5651aee..a610fd4bcd4 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll @@ -912,7 +912,7 @@ private module Cached { } cached - Definition uncertainWriteDefinitionInput(UncertainWriteDefinition def) { + deprecated Definition uncertainWriteDefinitionInput(UncertainWriteDefinition def) { Impl::uncertainWriteDefinitionInput(def, result) }