Merge pull request #4757 from yoff/python-dataflow-synthetic-callables

Python: Enclosing callable for synthetic arguments
This commit is contained in:
Rasmus Wriedt Larsen
2020-12-18 16:06:26 +01:00
committed by GitHub
3 changed files with 36 additions and 0 deletions

View File

@@ -287,6 +287,13 @@ class PosOverflowNode extends Node, TPosOverflowNode {
override string toString() { result = "PosOverflowNode for " + call.getNode().toString() }
override DataFlowCallable getEnclosingCallable() {
exists(Node node |
node = TCfgNode(call) and
result = node.getEnclosingCallable()
)
}
override Location getLocation() { result = call.getLocation() }
}
@@ -301,6 +308,13 @@ class KwOverflowNode extends Node, TKwOverflowNode {
override string toString() { result = "KwOverflowNode for " + call.getNode().toString() }
override DataFlowCallable getEnclosingCallable() {
exists(Node node |
node = TCfgNode(call) and
result = node.getEnclosingCallable()
)
}
override Location getLocation() { result = call.getLocation() }
}
@@ -316,6 +330,13 @@ class KwUnpacked extends Node, TKwUnpacked {
override string toString() { result = "KwUnpacked " + name }
override DataFlowCallable getEnclosingCallable() {
exists(Node node |
node = TCfgNode(call) and
result = node.getEnclosingCallable()
)
}
override Location getLocation() { result = call.getLocation() }
}