Files
codeql/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.ql
2019-01-11 13:55:28 +01:00

16 lines
512 B
Plaintext

import csharp
ControlFlow::Node successor(ControlFlow::Node node, boolean kind) {
kind = true and result = node.getATrueSuccessor()
or
kind = false and result = node.getAFalseSuccessor()
}
from ControlFlow::Node node, ControlFlow::Node successor, Location nl, Location sl, boolean kind
where
successor = successor(node, kind) and
nl = node.getLocation() and
sl = successor.getLocation()
select nl.getStartLine(), nl.getStartColumn(), node, kind, sl.getStartLine(), sl.getStartColumn(),
successor