Skip to content

Commit dcef6cb

Browse files
committed
change join order for API::InvokeNode::getParameter
1 parent c80365c commit dcef6cb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

javascript/ql/src/semmle/javascript/ApiGraphs.qll

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,11 +914,17 @@ module API {
914914
}
915915

916916
/** Gets the API node for the `i`th parameter of this invocation. */
917+
pragma[nomagic]
917918
Node getParameter(int i) {
918919
result = callee.getParameter(i) and
919-
result.getARhs() = getArgument(i)
920+
result = getAParameterCandidate(i)
920921
}
921922

923+
/**
924+
* Gets an API node where a RHS of the node if the `i`th argument to this call.
925+
*/
926+
private Node getAParameterCandidate(int i) { result.getARhs() = getArgument(i) }
927+
922928
/** Gets the API node for a parameter of this invocation. */
923929
Node getAParameter() { result = getParameter(_) }
924930

0 commit comments

Comments
 (0)