Swift: Extract structured keypath components.

Changes in swift/ql/lib are generated by swift/codegen without manual intervention.
This commit is contained in:
Alexandre Boulgakov
2023-04-06 18:26:14 +01:00
parent 2b1dea56b5
commit 35a2d55d18
40 changed files with 821 additions and 34 deletions

View File

@@ -0,0 +1,12 @@
// generated by codegen/codegen.py
import codeql.swift.elements
import TestUtils
from KeyPathExpr x, string hasType, string hasRoot, int getNumberOfComponents
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasType() then hasType = "yes" else hasType = "no") and
(if x.hasRoot() then hasRoot = "yes" else hasRoot = "no") and
getNumberOfComponents = x.getNumberOfComponents()
select x, "hasType:", hasType, "hasRoot:", hasRoot, "getNumberOfComponents:", getNumberOfComponents