Skip to content

Commit fb438bf

Browse files
committed
C#: Remove references to getAFirstReadAtNode.
1 parent e5d219a commit fb438bf

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

csharp/ql/lib/semmle/code/csharp/Assignable.qll

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,7 @@ class AssignableDefinition extends TAssignableDefinition {
500500
*/
501501
pragma[nomagic]
502502
AssignableRead getAFirstRead() {
503-
exists(ControlFlowNode cfn | cfn = result.getControlFlowNode() |
504-
exists(Ssa::ExplicitDefinition def | result = def.getAFirstReadAtNode(cfn) |
505-
this = def.getADefinition()
506-
)
507-
)
503+
exists(Ssa::ExplicitDefinition def | result = def.getAFirstRead() | this = def.getADefinition())
508504
}
509505

510506
/** Gets a textual representation of this assignable definition. */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ private Ssa::Definition getAnUltimateDefinition(Ssa::Definition def) {
241241
* exception.
242242
*/
243243
private predicate defReaches(Ssa::Definition def, ControlFlowNode cfn) {
244-
exists(def.getAFirstReadAtNode(cfn))
244+
def.getAFirstRead().getControlFlowNode() = cfn
245245
or
246246
exists(ControlFlowNode mid | defReaches(def, mid) |
247247
SsaImpl::adjacentReadPairSameVar(_, mid, cfn) and

0 commit comments

Comments
 (0)