mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
18 lines
384 B
Plaintext
18 lines
384 B
Plaintext
// Every reachable node has a dominator
|
|
|
|
import cpp
|
|
import semmle.code.cpp.controlflow.Dominance
|
|
|
|
ControlFlowNode reachableIn(Function func) {
|
|
result = func.getEntryPoint()
|
|
or result = reachableIn(func).getASuccessor()
|
|
}
|
|
|
|
|
|
from Function func, ControlFlowNode node
|
|
where
|
|
node = reachableIn(func)
|
|
and node != func.getEntryPoint()
|
|
and not iDominates(_, node)
|
|
select func, node
|