Skip to content

Commit e47ba6a

Browse files
committed
WIP try to implement barrierNode
1 parent c72f9a0 commit e47ba6a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,15 @@ private module Cached {
11591159

11601160
/** Holds if `n` is a flow barrier of kind `kind`. */
11611161
cached
1162-
predicate barrierNode(Node n, string kind) { n.(FlowSummaryNode).isBarrier(kind, _) }
1162+
predicate barrierNode(Node n, string kind) {
1163+
exists(string model |
1164+
n.(FlowSummaryNode)
1165+
.getSummaryNode()
1166+
.(FlowSummaryImpl::Private::SourceOutputNode)
1167+
.isEntry(kind, model)
1168+
// getSourceElement().(FlowBarrier).isBarrier(_, kind, _, _)
1169+
)
1170+
}
11631171

11641172
/**
11651173
* A step in a flow summary defined using `OptionalStep[name]`. An `OptionalStep` is "opt-in", which means

0 commit comments

Comments
 (0)