mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
33 lines
727 B
Plaintext
33 lines
727 B
Plaintext
private import codeql.swift.elements
|
|
|
|
cached
|
|
predicate toBeTested(Element e) {
|
|
e instanceof File
|
|
or
|
|
exists(ModuleDecl m |
|
|
not m.isBuiltinModule() and
|
|
not m.isSystemModule() and
|
|
(m = e or m.getInterfaceType() = e)
|
|
)
|
|
or
|
|
exists(Locatable loc |
|
|
loc.getLocation().getFile().getName().matches("%swift/ql/test%") and
|
|
(
|
|
e = loc
|
|
or
|
|
exists(Type t |
|
|
(e = t or e = t.(ExistentialType).getConstraint() or e = t.getCanonicalType()) and
|
|
(
|
|
t = loc.(ValueDecl).getInterfaceType()
|
|
or
|
|
t = loc.(NominalTypeDecl).getType()
|
|
or
|
|
t = loc.(VarDecl).getType()
|
|
or
|
|
t = loc.(Expr).getType()
|
|
)
|
|
)
|
|
)
|
|
)
|
|
}
|