Skip to content

Commit 95c0288

Browse files
committed
C#: Deprecate Ssa::ImplicitEntryDefinition.
1 parent b3189f8 commit 95c0288

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,13 @@ module Ssa {
539539
}
540540

541541
/**
542+
* DEPRECATED: Use `SsaParameterInit` or `SsaImplicitEntryDefinition` instead.
543+
*
542544
* An SSA definition representing the implicit initialization of a variable
543545
* at the beginning of a callable. Either a parameter, a local scope variable
544546
* captured by the callable, or a field or property accessed inside the callable.
545547
*/
546-
class ImplicitEntryDefinition extends ImplicitDefinition {
548+
deprecated class ImplicitEntryDefinition extends ImplicitDefinition {
547549
ImplicitEntryDefinition() {
548550
exists(BasicBlock bb, SourceVariable v |
549551
this.definesAt(v, bb, -1) and
@@ -564,7 +566,9 @@ module Ssa {
564566
}
565567

566568
pragma[nomagic]
567-
private predicate implicitEntryDef(ImplicitEntryDefinition def, SourceVariable v, Callable c) {
569+
deprecated private predicate implicitEntryDef(
570+
ImplicitEntryDefinition def, SourceVariable v, Callable c
571+
) {
568572
v = def.getSourceVariable() and
569573
c = def.getCallable()
570574
}

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ private module ParameterNodes {
14151415
}
14161416

14171417
/** An implicit entry definition for a captured variable. */
1418-
class SsaCapturedEntryDefinition extends Ssa::ImplicitEntryDefinition {
1418+
deprecated class SsaCapturedEntryDefinition extends Ssa::ImplicitEntryDefinition {
14191419
private LocalScopeVariable v;
14201420

14211421
SsaCapturedEntryDefinition() { this.getSourceVariable().getAssignable() = v }
@@ -1996,9 +1996,6 @@ private class FieldOrPropertyRead extends FieldOrPropertyAccess, AssignableRead
19961996
exists(SsaDefinition def, Ssa::ImplicitDefinition idef |
19971997
def.getARead() = this and
19981998
idef = def.getAnUltimateDefinition()
1999-
|
2000-
idef instanceof Ssa::ImplicitEntryDefinition or
2001-
idef instanceof Ssa::ImplicitCallDefinition
20021999
)
20032000
}
20042001
}

0 commit comments

Comments
 (0)