Skip to content

Commit 55b83ca

Browse files
committed
C#: Deprecate Ssa::Definition in favour of SsaDefinition.
1 parent de96b5a commit 55b83ca

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

  • csharp/ql/lib/semmle/code/csharp/dataflow

csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ module Ssa {
7474
* Gets an SSA definition that has this variable as its underlying
7575
* source variable.
7676
*/
77-
Definition getAnSsaDefinition() { result.getSourceVariable() = this }
77+
SsaDefinition getAnSsaDefinition() { result.getSourceVariable() = this }
7878
}
7979

8080
/** Provides different types of `SourceVariable`s. */
@@ -193,11 +193,13 @@ module Ssa {
193193
predicate isLiveOutRefParameterDefinition = SsaImpl::isLiveOutRefParameterDefinition/2;
194194

195195
/**
196+
* DEPRECATED: Use `SsaDefinition` instead.
197+
*
196198
* A static single assignment (SSA) definition. Either an explicit variable
197199
* definition (`ExplicitDefinition`), an implicit variable definition
198200
* (`ImplicitDefinition`), or a phi node (`PhiNode`).
199201
*/
200-
class Definition extends SsaImpl::Definition {
202+
deprecated class Definition extends SsaImpl::Definition {
201203
/** Gets the control flow node of this SSA definition. */
202204
final ControlFlowNode getControlFlowNode() {
203205
exists(BasicBlock bb, int i | this.definesAt(_, bb, i) | result = bb.getNode(0.maximum(i)))
@@ -632,7 +634,7 @@ module Ssa {
632634
* via an SSA definition for the qualifier.
633635
*/
634636
class ImplicitQualifierDefinition extends SsaImplicitWrite {
635-
private Definition q;
637+
private SsaDefinition q;
636638

637639
ImplicitQualifierDefinition() {
638640
exists(BasicBlock bb, int i, SourceVariables::QualifiedFieldOrPropSourceVariable v |
@@ -644,7 +646,7 @@ module Ssa {
644646
}
645647

646648
/** Gets the SSA definition for the qualifier. */
647-
final Definition getQualifierDefinition() { result = q }
649+
final SsaDefinition getQualifierDefinition() { result = q }
648650

649651
override string toString() { result = "SSA qualifier def(" + this.getSourceVariable() + ")" }
650652
}

0 commit comments

Comments
 (0)