From 294de742a46b807416d37afb63f3f38180850f84 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Mon, 15 Dec 2025 17:00:50 +0100 Subject: [PATCH 1/4] Swift: Update to Swift 6.2.3 --- swift/extractor/infra/SwiftTagTraits.h | 1 + swift/third_party/load.bzl | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/swift/extractor/infra/SwiftTagTraits.h b/swift/extractor/infra/SwiftTagTraits.h index 806ad0a5ffd1..f7825043edda 100644 --- a/swift/extractor/infra/SwiftTagTraits.h +++ b/swift/extractor/infra/SwiftTagTraits.h @@ -287,6 +287,7 @@ MAP(swift::TypeBase, TypeTag) MAP(swift::BuiltinNonDefaultDistributedActorStorageType, void) // Does not appear in AST/SIL, only used during IRGen MAP(swift::BuiltinFixedArrayType, BuiltinFixedArrayTypeTag) MAP(swift::BuiltinUnboundGenericType, void) // Only used during type resolution + MAP(swift::BuiltinImplicitActorType, void) // SIL type MAP(swift::TupleType, TupleTypeTag) MAP(swift::ReferenceStorageType, ReferenceStorageTypeTag) MAP(swift::WeakStorageType, WeakStorageTypeTag) diff --git a/swift/third_party/load.bzl b/swift/third_party/load.bzl index d19345a18803..5881227d2fbf 100644 --- a/swift/third_party/load.bzl +++ b/swift/third_party/load.bzl @@ -5,6 +5,10 @@ load("//misc/bazel:lfs.bzl", "lfs_archive", "lfs_files") _override = { # these are used to test new artifacts. Must be empty before merging to main + "swift-prebuilt-macOS-swift-6.2.3-RELEASE-137.tar.zst": "a96536acde3a054a2528feedbb6ffa71fb7ffa6b68f0838f2f007e7474fc0b84", + "swift-prebuilt-Linux-swift-6.2.3-RELEASE-137.tar.zst": "ad8d6611bfd3c749435e44fa25a300082efb308c21c5da1305c65bd2c5d8fec4", + "resource-dir-macOS-swift-6.2.3-RELEASE-137.zip": "e358d99dab2bf07d70a06d8d4119c05ee40e33cdc659ad787595dc56cb405755", + "resource-dir-Linux-swift-6.2.3-RELEASE-137.zip": "ab0279edb35706dbd5c238f6ea29b2a275bb837e1d6485e150801551c7f0740e", } _staging_url = "https://github.com/dsp-testing/codeql-swift-artifacts/releases/download/staging-{}/{}" From a04b10cb861c0612e36144f08cb52a9b37d05797 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Tue, 16 Dec 2025 12:52:40 +0100 Subject: [PATCH 2/4] Swift: Fix dataset check errors by not referring to unavailable decls Test Test Test Test Test Test --- swift/extractor/translators/ExprTranslator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/extractor/translators/ExprTranslator.cpp b/swift/extractor/translators/ExprTranslator.cpp index 936bf64940f4..a5ae49230b83 100644 --- a/swift/extractor/translators/ExprTranslator.cpp +++ b/swift/extractor/translators/ExprTranslator.cpp @@ -538,7 +538,7 @@ void ExprTranslator::fillSelfApplyExpr(const swift::SelfApplyExpr& expr, void ExprTranslator::fillLookupExpr(const swift::LookupExpr& expr, codeql::LookupExpr& entry) { entry.base = dispatcher.fetchLabel(expr.getBase()); - if (expr.hasDecl()) { + if (expr.hasDecl() && !expr.getDecl().getDecl()->isUnavailable()) { entry.member = dispatcher.fetchLabel(expr.getDecl().getDecl()); } } From 64ee0d3b9d9a43765cbb1ac41c6a2c4841b27a50 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Thu, 18 Dec 2025 15:43:33 +0100 Subject: [PATCH 3/4] Swift: Add change note --- swift/ql/lib/change-notes/2025-12-18-swift-6.2.3.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 swift/ql/lib/change-notes/2025-12-18-swift-6.2.3.md diff --git a/swift/ql/lib/change-notes/2025-12-18-swift-6.2.3.md b/swift/ql/lib/change-notes/2025-12-18-swift-6.2.3.md new file mode 100644 index 000000000000..b81064600493 --- /dev/null +++ b/swift/ql/lib/change-notes/2025-12-18-swift-6.2.3.md @@ -0,0 +1,4 @@ +--- +category: majorAnalysis +--- +* Upgraded to allow analysis of Swift 6.2.3. \ No newline at end of file From ed7854cc0de983b8ac0e6f0a46c29106cbcf8648 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Thu, 18 Dec 2025 15:45:35 +0100 Subject: [PATCH 4/4] Swift: Update LFS artifacts --- swift/third_party/load.bzl | 4 ---- swift/third_party/resources/resource-dir-linux.zip | 4 ++-- swift/third_party/resources/resource-dir-macos.zip | 4 ++-- swift/third_party/resources/swift-prebuilt-linux.tar.zst | 4 ++-- swift/third_party/resources/swift-prebuilt-macos.tar.zst | 4 ++-- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/swift/third_party/load.bzl b/swift/third_party/load.bzl index 5881227d2fbf..d19345a18803 100644 --- a/swift/third_party/load.bzl +++ b/swift/third_party/load.bzl @@ -5,10 +5,6 @@ load("//misc/bazel:lfs.bzl", "lfs_archive", "lfs_files") _override = { # these are used to test new artifacts. Must be empty before merging to main - "swift-prebuilt-macOS-swift-6.2.3-RELEASE-137.tar.zst": "a96536acde3a054a2528feedbb6ffa71fb7ffa6b68f0838f2f007e7474fc0b84", - "swift-prebuilt-Linux-swift-6.2.3-RELEASE-137.tar.zst": "ad8d6611bfd3c749435e44fa25a300082efb308c21c5da1305c65bd2c5d8fec4", - "resource-dir-macOS-swift-6.2.3-RELEASE-137.zip": "e358d99dab2bf07d70a06d8d4119c05ee40e33cdc659ad787595dc56cb405755", - "resource-dir-Linux-swift-6.2.3-RELEASE-137.zip": "ab0279edb35706dbd5c238f6ea29b2a275bb837e1d6485e150801551c7f0740e", } _staging_url = "https://github.com/dsp-testing/codeql-swift-artifacts/releases/download/staging-{}/{}" diff --git a/swift/third_party/resources/resource-dir-linux.zip b/swift/third_party/resources/resource-dir-linux.zip index 21f02672b1b0..2daa0182274f 100644 --- a/swift/third_party/resources/resource-dir-linux.zip +++ b/swift/third_party/resources/resource-dir-linux.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d2aa88f3f9e2ff181a9c9607f95804b959fb334947cf72c566666b3be98ff2e -size 385200751 +oid sha256:ab0279edb35706dbd5c238f6ea29b2a275bb837e1d6485e150801551c7f0740e +size 385211225 diff --git a/swift/third_party/resources/resource-dir-macos.zip b/swift/third_party/resources/resource-dir-macos.zip index 1a059eda5ef8..3bcca5372bac 100644 --- a/swift/third_party/resources/resource-dir-macos.zip +++ b/swift/third_party/resources/resource-dir-macos.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b5e4bfbfaf1c9bae0bff0580797803a05328c08fffee47de406a5fa6cd7e19c7 -size 613729529 +oid sha256:e358d99dab2bf07d70a06d8d4119c05ee40e33cdc659ad787595dc56cb405755 +size 613934298 diff --git a/swift/third_party/resources/swift-prebuilt-linux.tar.zst b/swift/third_party/resources/swift-prebuilt-linux.tar.zst index 2770d5be19f7..5caeaeb8b5ff 100644 --- a/swift/third_party/resources/swift-prebuilt-linux.tar.zst +++ b/swift/third_party/resources/swift-prebuilt-linux.tar.zst @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b5efba3953668d02a15b74bcf637831be99824702cfd74ac8cf53b31d89a4f2a -size 132824388 +oid sha256:ad8d6611bfd3c749435e44fa25a300082efb308c21c5da1305c65bd2c5d8fec4 +size 132921192 diff --git a/swift/third_party/resources/swift-prebuilt-macos.tar.zst b/swift/third_party/resources/swift-prebuilt-macos.tar.zst index 7121b9743a56..b57ed126f8fa 100644 --- a/swift/third_party/resources/swift-prebuilt-macos.tar.zst +++ b/swift/third_party/resources/swift-prebuilt-macos.tar.zst @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4b5e8997a99155330871e146288a8947fa224ba05e54539c795f21c082c7a940 -size 115298351 +oid sha256:a96536acde3a054a2528feedbb6ffa71fb7ffa6b68f0838f2f007e7474fc0b84 +size 115338478