diff --git a/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPublic.qll b/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPublic.qll index c8eedc76bf5..6235109d39e 100644 --- a/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPublic.qll +++ b/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPublic.qll @@ -207,6 +207,7 @@ module Content { } } + /** An element of an array at an unknown index */ class ArrayContent extends Content, TArrayContent { override string toString() { result = "Array element" } } diff --git a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Array.qll b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Array.qll index d12c2369065..3751c6ac1bd 100644 --- a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Array.qll +++ b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Array.qll @@ -1,6 +1,13 @@ +/** + * Provides models for `Array` and related Swift classes. + */ + import swift private import codeql.swift.dataflow.ExternalFlow +/** + * An instance of the `Array` type. + */ class ArrayType extends BoundGenericType { ArrayType() { this.getName().matches("Array<%") } }