Python: update call graph test

we also have flow into functions!
This commit is contained in:
Rasmus Lerchedahl Petersen
2020-06-19 07:49:47 +02:00
parent 5a864aab87
commit 5ca6391f15
4 changed files with 7 additions and 0 deletions

View File

@@ -1 +1,2 @@
| test.py:4:10:4:10 | ControlFlowNode for z | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | | test.py:4:10:4:10 | ControlFlowNode for z | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() |
| test.py:7:19:7:19 | ControlFlowNode for a | test.py:1:19:1:19 | SSA variable x |

View File

@@ -8,9 +8,13 @@ class CallGraphConfig extends DataFlow::Configuration {
override predicate isSource(DataFlow::Node node) { override predicate isSource(DataFlow::Node node) {
node instanceof DataFlow::ReturnNode node instanceof DataFlow::ReturnNode
or
node instanceof DataFlow::ArgumentNode
} }
override predicate isSink(DataFlow::Node node) { override predicate isSink(DataFlow::Node node) {
node instanceof DataFlow::OutNode node instanceof DataFlow::OutNode
or
node instanceof DataFlow::ParameterNode
} }
} }

View File

@@ -1 +1,2 @@
| test.py:1:19:1:19 | SSA variable x |
| test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() |

View File

@@ -1 +1,2 @@
| test.py:4:10:4:10 | ControlFlowNode for z | | test.py:4:10:4:10 | ControlFlowNode for z |
| test.py:7:19:7:19 | ControlFlowNode for a |