mirror of
https://github.com/github/codeql.git
synced 2026-02-14 22:21:06 +01:00
- changes `getReceiver` to `getObject` - fixes `calls` to avoid unwanted cross-talk - adds some more documentation to highlight the above issue
19 lines
593 B
Plaintext
19 lines
593 B
Plaintext
import python
|
|
import semmle.python.dataflow.new.DataFlow
|
|
import experimental.dataflow.TestUtil.PrintNode
|
|
|
|
query predicate conjunctive_lookup(
|
|
DataFlow::MethodCallNode methCall, string call, string object, string methodName
|
|
) {
|
|
call = prettyNode(methCall) and
|
|
object = prettyNode(methCall.getObject()) and
|
|
methodName = methCall.getMethodName()
|
|
}
|
|
|
|
query predicate calls_lookup(
|
|
DataFlow::MethodCallNode methCall, string call, string object, string methodName
|
|
) {
|
|
call = prettyNode(methCall) and
|
|
exists(DataFlow::Node o | methCall.calls(o, methodName) and object = prettyNode(o))
|
|
}
|