mirror of
https://github.com/github/codeql.git
synced 2026-03-06 15:49:08 +01:00
18 lines
494 B
Plaintext
18 lines
494 B
Plaintext
import cpp
|
|
|
|
string successorInfo(ControlFlowNode x) {
|
|
if exists(x.getASuccessor())
|
|
then exists(ControlFlowNode y |
|
|
y = x.getASuccessor() |
|
|
result = y.getLocation().getStartLine().toString() + " "
|
|
+ y.toString())
|
|
else result = "<no successors>"
|
|
}
|
|
|
|
from ControlFlowNode x
|
|
select x.getLocation().getStartLine(),
|
|
count(x.getAPredecessor*()), // This helps order things sensibly
|
|
x.toString(),
|
|
successorInfo(x)
|
|
|