mirror of
https://github.com/github/codeql.git
synced 2026-05-20 22:27:18 +02:00
15 lines
493 B
Plaintext
15 lines
493 B
Plaintext
import csharp
|
|
import ControlFlow
|
|
|
|
query predicate conditionBlock(BasicBlock cb, BasicBlock controlled, boolean testIsTrue) {
|
|
cb.edgeDominates(controlled, any(ConditionalSuccessor s | testIsTrue = s.getValue()))
|
|
}
|
|
|
|
ControlFlowNode successor(ControlFlowNode node, boolean kind) {
|
|
result = node.getASuccessor(any(BooleanSuccessor s | s.getValue() = kind))
|
|
}
|
|
|
|
query predicate conditionFlow(ControlFlowNode node, ControlFlowNode successor, boolean kind) {
|
|
successor = successor(node, kind)
|
|
}
|