Skip to content

Commit 659d8e7

Browse files
committed
C#: Remove splitting-awareness in argumentOf.
1 parent 1e8de05 commit 659d8e7

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

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

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,35 +1551,15 @@ abstract private class ArgumentNodeImpl extends Node {
15511551
}
15521552

15531553
private module ArgumentNodes {
1554-
private class ArgumentConfiguration extends ControlFlowReachabilityConfiguration {
1555-
ArgumentConfiguration() { this = "ArgumentConfiguration" }
1556-
1557-
override predicate candidate(
1558-
Expr e1, Expr e2, ControlFlowElement scope, boolean exactScope, boolean isSuccessor
1559-
) {
1560-
e1.(Argument).isArgumentOf(e2, _) and
1561-
exactScope = false and
1562-
isSuccessor = true and
1563-
if e2 instanceof PropertyWrite
1564-
then
1565-
exists(AssignableDefinition def |
1566-
def.getTargetAccess() = e2 and
1567-
scope = def.getExpr()
1568-
)
1569-
else scope = e2
1570-
}
1571-
}
1572-
15731554
/** A data-flow node that represents an explicit call argument. */
15741555
class ExplicitArgumentNode extends ArgumentNodeImpl {
15751556
ExplicitArgumentNode() { this.asExpr() instanceof Argument }
15761557

15771558
override predicate argumentOf(DataFlowCall call, ArgumentPosition pos) {
1578-
exists(ArgumentConfiguration x, Expr c, Argument arg |
1559+
exists(Expr c, Argument arg |
15791560
arg = this.asExpr() and
15801561
c = call.getExpr() and
1581-
arg.isArgumentOf(c, pos) and
1582-
x.hasExprPath(_, this.getControlFlowNode(), _, call.getControlFlowNode())
1562+
arg.isArgumentOf(c, pos)
15831563
)
15841564
}
15851565
}

0 commit comments

Comments
 (0)