Skip to content

Commit 7f6c84d

Browse files
committed
C#: Fix bad join order.
1 parent 35b9306 commit 7f6c84d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ class ExprNode extends Node, TExprNode {
8686
}
8787
}
8888

89+
pragma[nomagic]
90+
private predicate isParameterOf0(DataFlowCallable c, ParameterPosition ppos, Parameter p) {
91+
p.getCallable() = c.asCallable() and
92+
p.getPosition() = ppos.getPosition()
93+
}
94+
8995
/**
9096
* The value of a parameter at function entry, viewed as a node in a data
9197
* flow graph.
@@ -95,7 +101,7 @@ class ParameterNode extends Node instanceof ParameterNodeImpl {
95101
Parameter getParameter() {
96102
exists(DataFlowCallable c, ParameterPosition ppos |
97103
super.isParameterOf(c, ppos) and
98-
result = c.asCallable().getParameter(ppos.getPosition())
104+
isParameterOf0(c, ppos, result)
99105
)
100106
}
101107
}

0 commit comments

Comments
 (0)