CodeQL library for JavaScript
codeql/javascript-all 0.7.5 ( changelog , source )

Member predicate ControlFlowNode :: isUnreachable

Holds if this node is unreachable, that is, it has no predecessors in the CFG. Entry nodes are always considered reachable.

Note that in a block of unreachable code, only the first node is unreachable in this sense. For instance, in

function foo() { return; s1; s2; }

s1 is unreachable, but s2 is not.

predicate isUnreachable ( )