mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Swift: Update KeyPathComponent for new kind values
This commit is contained in:
4
swift/ql/.generated.list
generated
4
swift/ql/.generated.list
generated
@@ -724,13 +724,13 @@ lib/codeql/swift/generated/Diagnostics.qll 03ea201db80d33b18f7f6c71267044c695c25
|
||||
lib/codeql/swift/generated/Element.qll bf8f688e05f44f18384067c3cab7f05796764e2b4cce7ff24da419c3dae26194 820390ffbb1012f73267668626f7d0ccd368500331c91bbc276fcb1c25037e41
|
||||
lib/codeql/swift/generated/ErrorElement.qll b39bd7c8b4e2011f4a6889e073ebf5b628db32f36f50b067250ae730d9f26561 fd859ec969ba434049e7ba4e78271cc8cebc8b058d2e96e4d47a22064cbb5a21
|
||||
lib/codeql/swift/generated/File.qll 476ac95566ef0080e0ad8c3da144b1be1d945d2f33a24f0864d85ff7c56a09b1 3134018bb50166cbf2690f64bba551cace350e4a7e6e25bcded18f997ad1835b
|
||||
lib/codeql/swift/generated/KeyPathComponent.qll 5276acdc9a4ff0ec0cc8af615c04043391fb99613731ddcc86db4e47b37c8c5a ccc0931bbd6cc2cfae5037c2ee17bbdcbd87536f5fed90d07e73065c016c4382
|
||||
lib/codeql/swift/generated/KeyPathComponent.qll 713f514d23f252777d7a207bf894aec3d614691a05b2dc250b3e50fa41c97a96 46fa3f1666a48ab8a3998f409581be9869b7d74ece6ff65725dc25c86d5a4dff
|
||||
lib/codeql/swift/generated/Locatable.qll 1d37fa20de71c0b9986bfd7a7c0cb82ab7bf3fda2d2008700f955ad82ce109a7 e97d4d4fb8a4800e0008cc00f60c8ed9b1ebd5f1140fd85e68b034616178d721
|
||||
lib/codeql/swift/generated/Location.qll 5e20316c3e480ddfe632b7e88e016c19f10a67df1f6ae9c8f128755a6907d6f5 5a0af2d070bcb2ed53d6d0282bf9c60dc64c2dce89c21fdd485e9c7893c1c8fa
|
||||
lib/codeql/swift/generated/MacroRole.qll facf907e75490d69cd401c491215e4719324d751f40ea46c86ccf24cf3663c1f 969d8d4b44e3f1a9c193a152a4d83a303e56d2dbb871fc920c47a33f699cf018
|
||||
lib/codeql/swift/generated/ParentChild.qll 88a8941821b1f511925eb8955ff25065a6004c61aa866854ee941d7556b1eb6d 6e32b4902cea8a78a9b2775826d64300987932c406212d841deeab7c48a5ef8b
|
||||
lib/codeql/swift/generated/PureSynthConstructors.qll bc31a6c4d142fa3fbdcae69d5ba6f1cec00eb9ad92b46c8d7b91ebfa7ef6c1f4 bc31a6c4d142fa3fbdcae69d5ba6f1cec00eb9ad92b46c8d7b91ebfa7ef6c1f4
|
||||
lib/codeql/swift/generated/Raw.qll 5d41235611a54943ded38965a2e474a6bdc7b2479823b880ed4d6c5431744117 6548a2ac345502c89a210d91f398d8d3b9625af9d24ebc37e43b55ba6e4efdac
|
||||
lib/codeql/swift/generated/Raw.qll 3491b6ec8362d409e5274fa7079d8910bdf6248b85d25986fce006fdd2927922 841eefe35c74ceda0ff24e7170137fd131d726f0c1f112c6b7e62ecb479e0aaf
|
||||
lib/codeql/swift/generated/Synth.qll a472fca73084eedab9ca8bb2fb82e7573d525444bb8d3729a3d18e06647fd96d b19984583774e30dae481d3d5cc95ebf2843c04dd952eb16cbf8a702ae52bbd8
|
||||
lib/codeql/swift/generated/SynthConstructors.qll f3687a56d2fd9bc38d95d9ca335f558a91c865bd0bd1c7c73affedefd7514183 f3687a56d2fd9bc38d95d9ca335f558a91c865bd0bd1c7c73affedefd7514183
|
||||
lib/codeql/swift/generated/UnknownFile.qll 247ddf2ebb49ce5ed4bf7bf91a969ddff37de6c78d43d8affccaf7eb586e06f2 452b29f0465ef45e978ef8b647b75e5a2a1e53f2a568fc003bc8f52f73b3fa4d
|
||||
|
||||
@@ -10,37 +10,37 @@ module Impl {
|
||||
/**
|
||||
* Property access like `.bar` in `\Foo.bar`.
|
||||
*/
|
||||
predicate isProperty() { this.getKind() = 3 }
|
||||
predicate isProperty() { this.getKind() = 5 }
|
||||
|
||||
/**
|
||||
* Array or dictionary subscript like `[1]` or `["a", "b"]`.
|
||||
*/
|
||||
predicate isSubscript() { this.getKind() = 4 }
|
||||
predicate isSubscript() { this.getKind() = 6 }
|
||||
|
||||
/**
|
||||
* Optional forcing `!`.
|
||||
*/
|
||||
predicate isOptionalForcing() { this.getKind() = 5 }
|
||||
predicate isOptionalForcing() { this.getKind() = 7 }
|
||||
|
||||
/**
|
||||
* Optional chaining `?`.
|
||||
*/
|
||||
predicate isOptionalChaining() { this.getKind() = 6 }
|
||||
predicate isOptionalChaining() { this.getKind() = 8 }
|
||||
|
||||
/**
|
||||
* Implicit optional wrapping component inserted by the compiler when an optional chain ends in a non-optional value.
|
||||
*/
|
||||
predicate isOptionalWrapping() { this.getKind() = 7 }
|
||||
predicate isOptionalWrapping() { this.getKind() = 9 }
|
||||
|
||||
/**
|
||||
* Reference to the entire object; the `self` in `\Foo.self`.
|
||||
*/
|
||||
predicate isSelf() { this.getKind() = 8 }
|
||||
predicate isSelf() { this.getKind() = 10 }
|
||||
|
||||
/**
|
||||
* Tuple indexing like `.1`.
|
||||
*/
|
||||
predicate isTupleIndexing() { this.getKind() = 9 }
|
||||
predicate isTupleIndexing() { this.getKind() = 11 }
|
||||
|
||||
/** Gets the underlying key-path expression which this is a component of. */
|
||||
KeyPathExpr getKeyPathExpr() { result.getAComponent() = this }
|
||||
|
||||
@@ -29,12 +29,15 @@ module Generated {
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*
|
||||
* This is 3 for properties, 4 for array and dictionary subscripts, 5 for optional forcing
|
||||
* (`!`), 6 for optional chaining (`?`), 7 for implicit optional wrapping, 8 for `self`,
|
||||
* and 9 for tuple element indexing.
|
||||
* TODO: Swift 6.2 update with UnresolvedApply and Apply
|
||||
* TODO: Swift 6.2 make sure to adjust in dbscheme upgrade/downgrade
|
||||
*
|
||||
* The following values should not appear: 0 for invalid components, 1 for unresolved
|
||||
* properties, 2 for unresolved subscripts, 10 for #keyPath dictionary keys, and 11 for
|
||||
* This is 5 for properties, 6 for array and dictionary subscripts, 7 for optional forcing
|
||||
* (`!`), 8 for optional chaining (`?`), 9 for implicit optional wrapping, 10 for `self`,
|
||||
* and 11 for tuple element indexing.
|
||||
*
|
||||
* The following values should not appear: 0 for invalid components, 2 for unresolved
|
||||
* properties, 3 for unresolved subscripts, 12 for #keyPath dictionary keys, and 13 for
|
||||
* implicit IDE code completion data.
|
||||
*/
|
||||
int getKind() {
|
||||
|
||||
13
swift/ql/lib/codeql/swift/generated/Raw.qll
generated
13
swift/ql/lib/codeql/swift/generated/Raw.qll
generated
@@ -226,12 +226,15 @@ module Raw {
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*
|
||||
* This is 3 for properties, 4 for array and dictionary subscripts, 5 for optional forcing
|
||||
* (`!`), 6 for optional chaining (`?`), 7 for implicit optional wrapping, 8 for `self`,
|
||||
* and 9 for tuple element indexing.
|
||||
* TODO: Swift 6.2 update with UnresolvedApply and Apply
|
||||
* TODO: Swift 6.2 make sure to adjust in dbscheme upgrade/downgrade
|
||||
*
|
||||
* The following values should not appear: 0 for invalid components, 1 for unresolved
|
||||
* properties, 2 for unresolved subscripts, 10 for #keyPath dictionary keys, and 11 for
|
||||
* This is 5 for properties, 6 for array and dictionary subscripts, 7 for optional forcing
|
||||
* (`!`), 8 for optional chaining (`?`), 9 for implicit optional wrapping, 10 for `self`,
|
||||
* and 11 for tuple element indexing.
|
||||
*
|
||||
* The following values should not appear: 0 for invalid components, 2 for unresolved
|
||||
* properties, 3 for unresolved subscripts, 12 for #keyPath dictionary keys, and 13 for
|
||||
* implicit IDE code completion data.
|
||||
*/
|
||||
int getKind() { key_path_components(this, result, _) }
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
instances
|
||||
| file://:0:0:0:0 | KeyPathComponent | getKind: | 7 | getComponentType: | Int? |
|
||||
| key_path_expr.swift:11:17:11:17 | KeyPathComponent | getKind: | 3 | getComponentType: | Int |
|
||||
| key_path_expr.swift:12:24:12:26 | KeyPathComponent | getKind: | 4 | getComponentType: | Int |
|
||||
| key_path_expr.swift:13:34:13:38 | KeyPathComponent | getKind: | 4 | getComponentType: | Int? |
|
||||
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 5 | getComponentType: | Int |
|
||||
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 8 | getComponentType: | Int? |
|
||||
| key_path_expr.swift:15:21:15:21 | KeyPathComponent | getKind: | 3 | getComponentType: | Bar? |
|
||||
| key_path_expr.swift:15:24:15:24 | KeyPathComponent | getKind: | 6 | getComponentType: | Bar |
|
||||
| key_path_expr.swift:15:26:15:26 | KeyPathComponent | getKind: | 3 | getComponentType: | Int? |
|
||||
| key_path_expr.swift:16:25:16:25 | KeyPathComponent | getKind: | 3 | getComponentType: | Bar? |
|
||||
| key_path_expr.swift:16:28:16:28 | KeyPathComponent | getKind: | 6 | getComponentType: | Bar |
|
||||
| key_path_expr.swift:16:30:16:30 | KeyPathComponent | getKind: | 3 | getComponentType: | Int |
|
||||
| key_path_expr.swift:17:16:17:16 | KeyPathComponent | getKind: | 8 | getComponentType: | Int |
|
||||
| key_path_expr.swift:18:32:18:32 | KeyPathComponent | getKind: | 9 | getComponentType: | Int |
|
||||
| file://:0:0:0:0 | KeyPathComponent | getKind: | 9 | getComponentType: | Int? |
|
||||
| key_path_expr.swift:11:17:11:17 | KeyPathComponent | getKind: | 5 | getComponentType: | Int |
|
||||
| key_path_expr.swift:12:24:12:26 | KeyPathComponent | getKind: | 6 | getComponentType: | Int |
|
||||
| key_path_expr.swift:13:34:13:38 | KeyPathComponent | getKind: | 6 | getComponentType: | Int? |
|
||||
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 7 | getComponentType: | Int |
|
||||
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 10 | getComponentType: | Int? |
|
||||
| key_path_expr.swift:15:21:15:21 | KeyPathComponent | getKind: | 5 | getComponentType: | Bar? |
|
||||
| key_path_expr.swift:15:24:15:24 | KeyPathComponent | getKind: | 8 | getComponentType: | Bar |
|
||||
| key_path_expr.swift:15:26:15:26 | KeyPathComponent | getKind: | 5 | getComponentType: | Int? |
|
||||
| key_path_expr.swift:16:25:16:25 | KeyPathComponent | getKind: | 5 | getComponentType: | Bar? |
|
||||
| key_path_expr.swift:16:28:16:28 | KeyPathComponent | getKind: | 8 | getComponentType: | Bar |
|
||||
| key_path_expr.swift:16:30:16:30 | KeyPathComponent | getKind: | 5 | getComponentType: | Int |
|
||||
| key_path_expr.swift:17:16:17:16 | KeyPathComponent | getKind: | 10 | getComponentType: | Int |
|
||||
| key_path_expr.swift:18:32:18:32 | KeyPathComponent | getKind: | 11 | getComponentType: | Int |
|
||||
getSubscriptArgument
|
||||
| key_path_expr.swift:12:24:12:26 | KeyPathComponent | 0 | key_path_expr.swift:12:25:12:25 | : 0 |
|
||||
| key_path_expr.swift:13:34:13:38 | KeyPathComponent | 0 | key_path_expr.swift:13:35:13:35 | : a |
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
| file://:0:0:0:0 | KeyPathComponent | getKind: | 7 | | | | | optional wrapping | | |
|
||||
| key_path_expr.swift:11:17:11:17 | KeyPathComponent | getKind: | 3 | property | | | | | | |
|
||||
| key_path_expr.swift:12:24:12:26 | KeyPathComponent | getKind: | 4 | | subscript | | | | | |
|
||||
| key_path_expr.swift:13:34:13:38 | KeyPathComponent | getKind: | 4 | | subscript | | | | | |
|
||||
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 5 | | | optional forcing | | | | |
|
||||
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 8 | | | | | | self | |
|
||||
| key_path_expr.swift:15:21:15:21 | KeyPathComponent | getKind: | 3 | property | | | | | | |
|
||||
| key_path_expr.swift:15:24:15:24 | KeyPathComponent | getKind: | 6 | | | | optional chaining | | | |
|
||||
| key_path_expr.swift:15:26:15:26 | KeyPathComponent | getKind: | 3 | property | | | | | | |
|
||||
| key_path_expr.swift:16:25:16:25 | KeyPathComponent | getKind: | 3 | property | | | | | | |
|
||||
| key_path_expr.swift:16:28:16:28 | KeyPathComponent | getKind: | 6 | | | | optional chaining | | | |
|
||||
| key_path_expr.swift:16:30:16:30 | KeyPathComponent | getKind: | 3 | property | | | | | | |
|
||||
| key_path_expr.swift:17:16:17:16 | KeyPathComponent | getKind: | 8 | | | | | | self | |
|
||||
| key_path_expr.swift:18:32:18:32 | KeyPathComponent | getKind: | 9 | | | | | | | tuple indexing |
|
||||
| file://:0:0:0:0 | KeyPathComponent | getKind: | 9 | | | | | optional wrapping | | |
|
||||
| key_path_expr.swift:11:17:11:17 | KeyPathComponent | getKind: | 5 | property | | | | | | |
|
||||
| key_path_expr.swift:12:24:12:26 | KeyPathComponent | getKind: | 6 | | subscript | | | | | |
|
||||
| key_path_expr.swift:13:34:13:38 | KeyPathComponent | getKind: | 6 | | subscript | | | | | |
|
||||
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 7 | | | optional forcing | | | | |
|
||||
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 10 | | | | | | self | |
|
||||
| key_path_expr.swift:15:21:15:21 | KeyPathComponent | getKind: | 5 | property | | | | | | |
|
||||
| key_path_expr.swift:15:24:15:24 | KeyPathComponent | getKind: | 8 | | | | optional chaining | | | |
|
||||
| key_path_expr.swift:15:26:15:26 | KeyPathComponent | getKind: | 5 | property | | | | | | |
|
||||
| key_path_expr.swift:16:25:16:25 | KeyPathComponent | getKind: | 5 | property | | | | | | |
|
||||
| key_path_expr.swift:16:28:16:28 | KeyPathComponent | getKind: | 8 | | | | optional chaining | | | |
|
||||
| key_path_expr.swift:16:30:16:30 | KeyPathComponent | getKind: | 5 | property | | | | | | |
|
||||
| key_path_expr.swift:17:16:17:16 | KeyPathComponent | getKind: | 10 | | | | | | self | |
|
||||
| key_path_expr.swift:18:32:18:32 | KeyPathComponent | getKind: | 11 | | | | | | | tuple indexing |
|
||||
|
||||
@@ -486,12 +486,15 @@ class KeyPathComponent(AstNode):
|
||||
kind: int | doc("kind of key path component") | desc("""
|
||||
INTERNAL: Do not use.
|
||||
|
||||
This is 3 for properties, 4 for array and dictionary subscripts, 5 for optional forcing
|
||||
(`!`), 6 for optional chaining (`?`), 7 for implicit optional wrapping, 8 for `self`,
|
||||
and 9 for tuple element indexing.
|
||||
TODO: Swift 6.2 update with UnresolvedApply and Apply
|
||||
TODO: Swift 6.2 make sure to adjust in dbscheme upgrade/downgrade
|
||||
|
||||
The following values should not appear: 0 for invalid components, 1 for unresolved
|
||||
properties, 2 for unresolved subscripts, 10 for #keyPath dictionary keys, and 11 for
|
||||
This is 5 for properties, 6 for array and dictionary subscripts, 7 for optional forcing
|
||||
(`!`), 8 for optional chaining (`?`), 9 for implicit optional wrapping, 10 for `self`,
|
||||
and 11 for tuple element indexing.
|
||||
|
||||
The following values should not appear: 0 for invalid components, 2 for unresolved
|
||||
properties, 3 for unresolved subscripts, 12 for #keyPath dictionary keys, and 13 for
|
||||
implicit IDE code completion data.
|
||||
""")
|
||||
subscript_arguments : list[Argument] | child | doc(
|
||||
|
||||
Reference in New Issue
Block a user