mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
17 lines
399 B
Plaintext
17 lines
399 B
Plaintext
// Every reachable node has a dominator
|
|
import default
|
|
import semmle.code.java.controlflow.Dominance
|
|
|
|
/** transitive dominance */
|
|
ControlFlowNode reachableIn(Method func) {
|
|
result = func.getBody() or
|
|
result = reachableIn(func).getASuccessor()
|
|
}
|
|
|
|
from Method func, ControlFlowNode node
|
|
where
|
|
node = reachableIn(func) and
|
|
node != func.getBody() and
|
|
not iDominates(_, node)
|
|
select func, node
|