mirror of
https://github.com/github/codeql.git
synced 2026-02-19 16:33:40 +01:00
Make BeginBlock CFG post-order
This commit is contained in:
@@ -1108,7 +1108,8 @@ module Trees {
|
||||
private class SimplePostOrderStmtSequenceTree extends StmtSequenceTree, PostOrderTree {
|
||||
SimplePostOrderStmtSequenceTree() {
|
||||
this instanceof StringInterpolationComponent or
|
||||
this instanceof ParenthesizedExpr
|
||||
this instanceof ParenthesizedExpr or
|
||||
this instanceof BeginBlock
|
||||
}
|
||||
|
||||
final override predicate first(AstNode first) { first(this.getStmt(0), first) }
|
||||
@@ -1136,7 +1137,8 @@ module Trees {
|
||||
not this instanceof EndBlock and
|
||||
not this instanceof StringInterpolationComponent and
|
||||
not this instanceof Block and
|
||||
not this instanceof ParenthesizedExpr
|
||||
not this instanceof ParenthesizedExpr and
|
||||
not this instanceof BeginBlock
|
||||
}
|
||||
|
||||
final override predicate propagatesAbnormal(AstNode child) { child = this.getAStmt() }
|
||||
|
||||
@@ -491,7 +491,7 @@ case.rb:
|
||||
|
||||
cfg.rb:
|
||||
# 1| enter cfg.rb
|
||||
#-----| -> BEGIN { ... }
|
||||
#-----| -> self
|
||||
|
||||
# 1| bar
|
||||
#-----| -> alias ...
|
||||
@@ -559,10 +559,10 @@ cfg.rb:
|
||||
#-----| -> call to puts
|
||||
|
||||
# 15| BEGIN { ... }
|
||||
#-----| -> self
|
||||
#-----| -> bar
|
||||
|
||||
# 16| call to puts
|
||||
#-----| -> bar
|
||||
#-----| -> BEGIN { ... }
|
||||
|
||||
# 16| self
|
||||
#-----| -> "hello"
|
||||
|
||||
Reference in New Issue
Block a user