Skip to content

Commit a929c0b

Browse files
committed
C#: Remove splitting-awareness from Range Analysis.
1 parent 427ccee commit a929c0b

File tree

2 files changed

+3
-261
lines changed

2 files changed

+3
-261
lines changed

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

Lines changed: 0 additions & 246 deletions
This file was deleted.

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

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,14 @@ private module Impl {
88
private import ConstantUtils
99
private import SsaReadPositionCommon
1010
private import semmle.code.csharp.controlflow.Guards as G
11-
private import ControlFlowReachability
1211

1312
private class ExprNode = ControlFlow::Nodes::ExprNode;
1413

15-
private class ExprChildReachability extends ControlFlowReachabilityConfiguration {
16-
ExprChildReachability() { this = "ExprChildReachability" }
17-
18-
override predicate candidate(
19-
Expr e1, Expr e2, ControlFlowElement scope, boolean exactScope, boolean isSuccessor
20-
) {
21-
e2 = e1.getAChild() and
22-
scope = e1 and
23-
exactScope = false and
24-
isSuccessor in [false, true]
25-
}
26-
}
27-
2814
/** Holds if `parent` having child `child` implies `parentNode` having child `childNode`. */
2915
predicate hasChild(Expr parent, Expr child, ExprNode parentNode, ExprNode childNode) {
30-
any(ExprChildReachability x).hasExprPath(parent, parentNode, child, childNode)
16+
parent.getAChild() = child and
17+
parentNode = parent.getControlFlowNode() and
18+
childNode = child.getControlFlowNode()
3119
}
3220

3321
/** Holds if SSA definition `def` equals `e + delta`. */

0 commit comments

Comments
 (0)