mirror of
https://github.com/github/codeql.git
synced 2026-02-19 16:33:40 +01:00
CFG: add nodes for block arguments
This commit is contained in:
@@ -313,13 +313,14 @@ 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.getReceiver() and i = 0
|
||||
or
|
||||
result = this.getMethod() and i = 1
|
||||
or
|
||||
result = this.getArguments() and i = 2
|
||||
or
|
||||
result = this.getBlock() and i = 3
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -647,6 +647,9 @@ cfg.rb:
|
||||
#-----| -> times
|
||||
|
||||
# 25| times
|
||||
#-----| -> Block
|
||||
|
||||
# 25| Block
|
||||
#-----| -> Call
|
||||
|
||||
# 25| x
|
||||
@@ -680,6 +683,9 @@ cfg.rb:
|
||||
#-----| -> new
|
||||
|
||||
# 29| new
|
||||
#-----| -> Block
|
||||
|
||||
# 29| Block
|
||||
#-----| -> Call
|
||||
|
||||
# 29| BlockParameter
|
||||
@@ -1985,6 +1991,9 @@ cfg.rb:
|
||||
#-----| -> exit top-level (normal)
|
||||
|
||||
# 189| run_block
|
||||
#-----| -> Block
|
||||
|
||||
# 189| Block
|
||||
#-----| -> Call
|
||||
|
||||
# 189| x
|
||||
@@ -2627,6 +2636,9 @@ loops.rb:
|
||||
#-----| -> Array
|
||||
|
||||
# 25| each
|
||||
#-----| -> DoBlock
|
||||
|
||||
# 25| DoBlock
|
||||
#-----| -> Call
|
||||
|
||||
# 25| x
|
||||
|
||||
Reference in New Issue
Block a user