mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
14 lines
373 B
Plaintext
14 lines
373 B
Plaintext
import csharp
|
|
|
|
query predicate arrayCreation(ArrayCreation creation, int i, Expr length) {
|
|
creation.fromSource() and
|
|
length = creation.getLengthArgument(i)
|
|
}
|
|
|
|
query predicate arrayElement(ArrayCreation array, int i, Expr element) {
|
|
array.fromSource() and
|
|
element = array.getInitializer().getElement(i)
|
|
}
|
|
|
|
query predicate stackalloc(Stackalloc a) { a.fromSource() }
|