C#: Fix bad join order.

This commit is contained in:
Michael Nebel
2024-03-04 11:03:46 +01:00
parent 35b93063f9
commit 7f6c84dda8

View File

@@ -86,6 +86,12 @@ class ExprNode extends Node, TExprNode {
}
}
pragma[nomagic]
private predicate isParameterOf0(DataFlowCallable c, ParameterPosition ppos, Parameter p) {
p.getCallable() = c.asCallable() and
p.getPosition() = ppos.getPosition()
}
/**
* The value of a parameter at function entry, viewed as a node in a data
* flow graph.
@@ -95,7 +101,7 @@ class ParameterNode extends Node instanceof ParameterNodeImpl {
Parameter getParameter() {
exists(DataFlowCallable c, ParameterPosition ppos |
super.isParameterOf(c, ppos) and
result = c.asCallable().getParameter(ppos.getPosition())
isParameterOf0(c, ppos, result)
)
}
}