mirror of
https://github.com/github/codeql.git
synced 2026-05-20 06:07:07 +02:00
15 lines
363 B
Plaintext
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
|