Skip to content

Commit 64a9598

Browse files
committed
JS: Update interface for isUnreachableInCall
1 parent 505c532 commit 64a9598

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

javascript/ql/lib/semmle/javascript/dataflow/internal/DataFlowPrivate.qll

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,10 +1009,19 @@ predicate expectsContent(Node n, ContentSet c) {
10091009
any(AdditionalFlowInternal flow).expectsContent(n, c)
10101010
}
10111011

1012+
abstract class NodeRegion extends Unit {
1013+
NodeRegion() { none() }
1014+
1015+
/** Holds if this region contains `n`. */
1016+
predicate contains(Node n) { none() }
1017+
1018+
int totalOrder() { none() }
1019+
}
1020+
10121021
/**
10131022
* Holds if the node `n` is unreachable when the call context is `call`.
10141023
*/
1015-
predicate isUnreachableInCall(Node n, DataFlowCall call) {
1024+
predicate isUnreachableInCall(NodeRegion n, DataFlowCall call) {
10161025
none() // TODO: could be useful, but not currently implemented for JS
10171026
}
10181027

0 commit comments

Comments
 (0)