mirror of
https://github.com/github/codeql.git
synced 2026-02-27 20:33:42 +01:00
`methodlookup.swift` has one more call to `Builtin.zeroInitializer()` in macOS than it does in Linux.
17 lines
522 B
Plaintext
17 lines
522 B
Plaintext
import swift
|
|
|
|
query predicate noStaticTarget(CallExpr c, Expr func, string funcClass) {
|
|
not exists(c.getStaticTarget()) and
|
|
func = c.getFunction() and
|
|
funcClass = func.getPrimaryQlClasses()
|
|
}
|
|
|
|
from CallExpr c, boolean hasStaticTarget
|
|
where
|
|
if exists(c.getStaticTarget().toString())
|
|
then
|
|
hasStaticTarget = true and
|
|
not c.getStaticTarget().toString() = "zeroInitializer()" // Omit because a different number of these calls appear in linux and macos
|
|
else hasStaticTarget = false
|
|
select c, hasStaticTarget
|