mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
17 lines
505 B
Plaintext
17 lines
505 B
Plaintext
|
|
|
|
import python
|
|
|
|
predicate
|
|
can_reach_from_entry_without_passing(ControlFlowNode target, ControlFlowNode pass) {
|
|
target != pass and target.getScope() = pass.getScope() and
|
|
(target.isEntryNode() or
|
|
exists(ControlFlowNode pre | target.getAPredecessor() = pre and can_reach_from_entry_without_passing(pre, pass)))
|
|
}
|
|
|
|
from ControlFlowNode node, ControlFlowNode dom
|
|
where dom = node.getImmediateDominator()
|
|
and
|
|
can_reach_from_entry_without_passing(node, dom)
|
|
select node.toString(), dom.toString()
|