mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
use local dataflow instead of type-inference for mayHaveBooleanValue
This commit is contained in:
@@ -106,7 +106,11 @@ module DataFlow {
|
||||
|
||||
/** Holds if this node may evaluate to the Boolean value `b`. */
|
||||
predicate mayHaveBooleanValue(boolean b) {
|
||||
b = analyze().getAValue().(AbstractBoolean).getBooleanValue()
|
||||
getAPredecessor().mayHaveBooleanValue(b) // needed stage 31 + stage 26 + stage 22 (unfixable)
|
||||
or
|
||||
b = true and asExpr().(BooleanLiteral).getValue() = "true"
|
||||
or
|
||||
b = false and asExpr().(BooleanLiteral).getValue() = "false"
|
||||
}
|
||||
|
||||
/** Gets the integer value of this node, if it is an integer constant. */
|
||||
|
||||
Reference in New Issue
Block a user