mirror of
https://github.com/github/codeql.git
synced 2026-04-24 08:15:14 +02:00
CFG: Fix bug in LogicalNotTree
This commit is contained in:
@@ -782,12 +782,8 @@ module Trees {
|
||||
|
||||
final override predicate succ(AstNode pred, AstNode succ, Completion c) {
|
||||
succ = this and
|
||||
(
|
||||
last(operand, pred, c.(BooleanCompletion).getDual())
|
||||
or
|
||||
last(operand, pred, c) and
|
||||
c instanceof SimpleCompletion
|
||||
)
|
||||
last(operand, pred, c) and
|
||||
c instanceof NormalCompletion
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2479,21 +2479,11 @@ ifs.rb:
|
||||
# 41| If
|
||||
#-----| -> exit constant_condition (normal)
|
||||
|
||||
# 41| Unary
|
||||
# 41| [false] Unary
|
||||
#-----| false -> If
|
||||
#-----| true -> puts
|
||||
|
||||
# 41| true
|
||||
#-----| false -> Unary
|
||||
|
||||
# 42| Call
|
||||
#-----| -> If
|
||||
|
||||
# 42| puts
|
||||
#-----| -> String
|
||||
|
||||
# 42| String
|
||||
#-----| -> Call
|
||||
#-----| true -> [false] Unary
|
||||
|
||||
loops.rb:
|
||||
# 1| Method
|
||||
|
||||
Reference in New Issue
Block a user