Files
codeql/swift/ql/lib/codeql/swift/generated/expr/ArrayToPointerExpr.qll
Paolo Tranquilli 946e1f498a Swift: generate getParent implementation
By explicitly marking children in the `schema.yml` file, an internal
`getAChild` predicate is implemented, that is in turn used in `AstNode`
to implement `getParent`.

This is yet to be used in the control flow library to replace the
hand-rolled implementation.

A further, more complex step is to use the same information to fully
generate the core implementation of `PrintAst` (including the
accessor string). This will be done later.

The `parent` tests use the same swift code as the extractor tests, and
this is currently enforced by `sync-files.py`. Notice that `qltest.sh`
had to be modified to deal with multiple files, which was not working
yet.
2022-06-01 14:32:58 +02:00

14 lines
406 B
Plaintext

// generated by codegen/codegen.py
import codeql.swift.elements.Element
import codeql.swift.elements.expr.ImplicitConversionExpr
class ArrayToPointerExprBase extends @array_to_pointer_expr, ImplicitConversionExpr {
override string getAPrimaryQlClass() { result = "ArrayToPointerExpr" }
cached
override Element getAChild() {
none() or
result = ImplicitConversionExpr.super.getAChild()
}
}