simplify graph

This commit is contained in:
Michael Hohn
2025-03-28 09:40:50 -07:00
parent 4d28d58287
commit 1cffd45d5f

View File

@@ -21,10 +21,12 @@ query predicate nodes(DataFlow::Node n1, string key, string value) {
}
query predicate edges(DataFlow::Node n1, DataFlow::Node n2) {
exists(Function f1 |
f1.hasName("copy_mem") and
n1.getFunction() = f1 and
// Find all nodes that flow into the conditional expression of an if-statement.
exists(ConditionalStmt cond, DataFlow::Node n3 |
cond.getControllingExpr().getAChild() = n3.asExpr() and
DataFlow::localFlow(n1, n3) and
DataFlow::localFlowStep(n1, n2) and
n1 != n2 and
n2.getLocation().getStartLine() < 46
)
}