CFG: Add @kind graph to Cfg.ql, and remove labels from ordinary successor edges

This commit is contained in:
Tom Hvitved
2020-12-14 11:00:26 +01:00
parent b14a889f5f
commit 89fb2f8498
2 changed files with 3313 additions and 2202 deletions

View File

@@ -1,3 +1,7 @@
/**
* @kind graph
*/
import codeql_ruby.controlflow.ControlFlowGraph
query predicate nodes(CfgNode n) { any() }
@@ -5,6 +9,6 @@ query predicate nodes(CfgNode n) { any() }
query predicate edges(CfgNode pred, CfgNode succ, string attr, string val) {
exists(SuccessorType t | succ = pred.getASuccessor(t) |
attr = "semmle.label" and
val = t.toString()
if t instanceof SuccessorTypes::NormalSuccessor then val = "" else val = t.toString()
)
}