Files
codeql/cpp/ql/test/library-tests/stmt_expr/cfg.ql
2018-08-02 17:53:23 +01:00

16 lines
517 B
Plaintext

import cpp
import semmle.code.cpp.exprs.ObjectiveC
from ControlFlowNode x, ControlFlowNode y, string entryPoint
where y = x.getASuccessor()
and if exists(Function f | f.getEntryPoint() = x)
then forex(Function f | f.getEntryPoint() = x | entryPoint = f.toString())
else entryPoint = "-----"
select x.getLocation().getStartLine(),
count(x.getAPredecessor*()), // This helps order things sensibly
x.toString(),
entryPoint,
y.getLocation().getStartLine(),
y.toString()