Files
codeql/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr.ql
Nora Dimitrijević f3ebb6e03b Swift: MethodLookupExpr.getMethodRef() [codegen'd]
This refactors SelfApplyExpr.getFunction() as MethodLookupExpr().getMethodRef().

This is simpler, because we are not hiding DeclRefExprs or reinventing hidden AST resolution.
2022-12-20 23:09:02 -05:00

15 lines
528 B
Plaintext

// generated by codegen/codegen.py
import codeql.swift.elements
import TestUtils
from MethodLookupExpr x, string hasType, Expr getBase, string hasMember, Expr getMethodRef
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasType() then hasType = "yes" else hasType = "no") and
getBase = x.getBase() and
(if x.hasMember() then hasMember = "yes" else hasMember = "no") and
getMethodRef = x.getMethodRef()
select x, "hasType:", hasType, "getBase:", getBase, "hasMember:", hasMember, "getMethodRef:",
getMethodRef