Skip to content

Commit 6b9ddf1

Browse files
committed
Guard non-extending subtype of G::Guard
1 parent e3e7412 commit 6b9ddf1

File tree

1 file changed

+3
-5
lines changed
  • csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis

1 file changed

+3
-5
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis/RangeUtils.qll

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,12 @@ private module Impl {
8989
}
9090

9191
/** An expression whose value may control the execution of another element. */
92-
class Guard extends Expr {
93-
Guard() { this instanceof G::Guard }
94-
92+
class Guard extends Expr instanceof G::Guard {
9593
/**
9694
* Holds if basic block `bb` is guarded by this guard having value `v`.
9795
*/
9896
predicate controlsBasicBlock(ControlFlow::BasicBlock bb, G::AbstractValue v) {
99-
this.(G::Guard).controlsBasicBlock(bb, v)
97+
super.controlsBasicBlock(bb, v)
10098
}
10199

102100
/**
@@ -108,7 +106,7 @@ private module Impl {
108106
exists(Expr e1_, Expr e2_ |
109107
e1 = unique(ExprNode cfn | hasChild(this, e1_, _, cfn) | cfn) and
110108
e2 = unique(ExprNode cfn | hasChild(this, e2_, _, cfn) | cfn) and
111-
this.(G::Guard).isEquality(e1_, e2_, polarity)
109+
super.isEquality(e1_, e2_, polarity)
112110
)
113111
}
114112
}

0 commit comments

Comments
 (0)