Skip to content

Commit 712765c

Browse files
committed
Python: Use ImportExp instead of SSA nodes
This also reverts the previous commit. It should be squashed with that one, but for now we keep the history, so we can track the performance tests.
1 parent 638fcab commit 712765c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python/ql/src/semmle/python/dataflow/new/TypeTracker.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ class TypeTracker extends TTypeTracker {
274274
* heap and/or inter-procedural step from `nodeFrom` to `nodeTo`.
275275
*/
276276
pragma[inline]
277-
TypeTracker step(Node nodeFrom, Node nodeTo) {
277+
TypeTracker step(LocalSourceNode nodeFrom, Node nodeTo) {
278278
exists(StepSummary summary |
279279
StepSummary::step(nodeFrom, nodeTo, summary) and
280280
result = this.append(summary)

python/ql/src/semmle/python/dataflow/new/internal/DataFlowUtil.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Node importNode(string name) {
4646
or
4747
name = alias.getValue().(ImportExpr).getImportedModuleName()
4848
) and
49-
result.(EssaNode).getVar().(AssignmentDefinition).getSourceVariable() = var
49+
result.asExpr() = alias.getValue()
5050
)
5151
or
5252
// Although it may seem superfluous to consider the `foo` part of `from foo import bar as baz` to

0 commit comments

Comments
 (0)