mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Update CFG: call receiers are evaluated before arguments
This commit is contained in:
@@ -321,9 +321,9 @@ module Trees {
|
||||
private class CallTree extends StandardPostOrderTree, Call {
|
||||
// this.getBlock() is not included as it uses a different scope
|
||||
final override AstNode getChildNode(int i) {
|
||||
result = this.getArguments() and i = 0
|
||||
result = this.getReceiver() and i = 0
|
||||
or
|
||||
result = this.getReceiver() and i = 1
|
||||
result = this.getArguments() and i = 1
|
||||
or
|
||||
result = this.getMethod() and i = 2
|
||||
}
|
||||
|
||||
@@ -646,7 +646,7 @@ cfg.rb:
|
||||
#-----| -> Break
|
||||
|
||||
# 35| If
|
||||
#-----| -> 42
|
||||
#-----| -> self
|
||||
|
||||
# 35| false
|
||||
#-----| false -> If
|
||||
@@ -655,13 +655,13 @@ cfg.rb:
|
||||
#-----| -> Case
|
||||
|
||||
# 39| self
|
||||
#-----| -> puts
|
||||
#-----| -> 42
|
||||
|
||||
# 39| puts
|
||||
#-----| -> Call
|
||||
|
||||
# 39| 42
|
||||
#-----| -> self
|
||||
#-----| -> puts
|
||||
|
||||
# 41| Case
|
||||
#-----| -> 10
|
||||
|
||||
Reference in New Issue
Block a user