Make all self nodes LocalSourceNodes

This commit is contained in:
Tom Hvitved
2021-10-20 11:38:17 +02:00
parent 94f0f8daf2
commit f1f7930529
2 changed files with 3 additions and 3 deletions

View File

@@ -236,7 +236,7 @@ private module Cached {
// for `self`. At that point, the `self`s returned by `trackInstance`
// in `DataFlowDispatch.qll` should refer to the post-update node,
// and we can remove this case.
n instanceof SelfArgumentNode
n.asExpr().getExpr() instanceof Self
or
not localFlowStepTypeTracker+(any(Node e |
e instanceof ExprNode

View File

@@ -2,6 +2,8 @@ getTarget
| calls.rb:2:5:2:14 | call to puts | calls.rb:87:5:87:17 | puts |
| calls.rb:5:1:5:3 | call to foo | calls.rb:1:1:3:3 | foo |
| calls.rb:5:1:5:3 | call to foo | calls.rb:71:1:75:3 | foo |
| calls.rb:8:5:8:14 | call to puts | calls.rb:87:5:87:17 | puts |
| calls.rb:11:1:11:8 | call to bar | calls.rb:7:1:9:3 | bar |
| calls.rb:13:1:13:8 | call to foo | calls.rb:1:1:3:3 | foo |
| calls.rb:13:1:13:8 | call to foo | calls.rb:71:1:75:3 | foo |
| calls.rb:22:5:22:15 | call to singleton_m | calls.rb:17:5:17:29 | singleton_m |
@@ -84,8 +86,6 @@ getTarget
| private.rb:28:1:28:12 | call to public | private.rb:5:3:6:5 | public |
| private.rb:30:1:30:15 | call to private_on_main | private.rb:21:1:22:3 | private_on_main |
unresolvedCall
| calls.rb:8:5:8:14 | call to puts |
| calls.rb:11:1:11:8 | call to bar |
| calls.rb:19:5:19:14 | call to instance_m |
| calls.rb:20:5:20:19 | call to instance_m |
| calls.rb:26:1:26:12 | call to instance_m |