Skip to content

Commit 439a67a

Browse files
committed
C#: Fix toString for capture definitions.
1 parent 5fbba0e commit 439a67a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

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

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,15 @@ module Ssa {
569569
override string toString() { result = SsaImpl::ParameterDefinitionImpl.super.toString() }
570570
}
571571

572+
/** An SSA definition in a closure that captures a variable. */
573+
class SsaCapturedDefinition extends SsaImplicitEntryDefinition {
574+
SsaCapturedDefinition() {
575+
this.getSourceVariable().getAssignable() instanceof LocalScopeVariable
576+
}
577+
578+
override string toString() { result = "SSA capture def(" + this.getSourceVariable() + ")" }
579+
}
580+
572581
/**
573582
* An SSA definition representing the potential definition of a variable
574583
* via a call.

0 commit comments

Comments
 (0)