Python: Use call instead of invocation

This commit is contained in:
Taus Brock-Nannestad
2021-02-03 19:49:53 +01:00
parent 3fafb47b16
commit 6ce160c51c
2 changed files with 7 additions and 7 deletions

View File

@@ -292,7 +292,7 @@ module API {
or
// Calling a node that is a use of `base`
lbl = Label::return() and
ref = pred.getAnInvocation()
ref = pred.getACall()
)
}

View File

@@ -477,9 +477,9 @@ class LocalSourceNode extends Node {
AttrRead getAnAttributeRead() { result = getAnAttributeReference() }
/**
* Gets an invocation (with our without `new`) of this node.
* Gets a call to this node.
*/
Node getAnInvocation() { Cached::invocation(this, result) }
Node getACall() { Cached::call(this, result) }
}
cached
@@ -521,12 +521,12 @@ private module Cached {
}
/**
* Holds if `func` flows to the callee of `invoke`.
* Holds if `func` flows to the callee of `call`.
*/
cached
predicate invocation(LocalSourceNode func, Node invoke) {
exists(CfgNode n, CallNode call |
invoke.asCfgNode() = call and n.asCfgNode() = call.getFunction()
predicate call(LocalSourceNode func, Node call) {
exists(CfgNode n, CallNode call_node |
call.asCfgNode() = call_node and n.asCfgNode() = call_node.getFunction()
|
hasLocalSource(n, func)
)