Files
codeql/csharp/ql/test/library-tests/controlflow/graph/EntryElement.ql
Anders Schack-Mulligen ff978d1a8c C#: Replace CFG.
2026-04-10 15:47:13 +02:00

15 lines
363 B
Plaintext

import csharp
import Common
predicate first(SourceControlFlowElement cfe, ControlFlowNode first) {
first.isBefore(cfe)
or
exists(ControlFlowNode mid |
first(cfe, mid) and not mid.injects(_) and first = mid.getASuccessor()
)
}
from SourceControlFlowElement cfe, ControlFlowElement first
where first(cfe, first.getControlFlowNode())
select cfe, first