We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
mayHaveBooleanValue
1 parent ae56285 commit 47f4faaCopy full SHA for 47f4faa
javascript/ql/src/semmle/javascript/dataflow/DataFlow.qll
@@ -106,7 +106,11 @@ module DataFlow {
106
107
/** Holds if this node may evaluate to the Boolean value `b`. */
108
predicate mayHaveBooleanValue(boolean b) {
109
- b = analyze().getAValue().(AbstractBoolean).getBooleanValue()
+ getAPredecessor().mayHaveBooleanValue(b) // needed stage 31 + stage 26 + stage 22 (unfixable)
110
+ or
111
+ b = true and asExpr().(BooleanLiteral).getValue() = "true"
112
113
+ b = false and asExpr().(BooleanLiteral).getValue() = "false"
114
}
115
116
/** Gets the integer value of this node, if it is an integer constant. */
0 commit comments