mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
Swift: Extract structured keypath components.
Changes in swift/ql/lib are generated by swift/codegen without manual intervention.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user