Skip to content

Commit bbde709

Browse files
committed
Swift: upgrade to 5.9.1
1 parent a0e73ea commit bbde709

File tree

11 files changed

+59
-97
lines changed

11 files changed

+59
-97
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
| file://:0:0:0:0 | Foo | getModule: | file://:0:0:0:0 | Foo | getNumberOfMembers: | 0 | getInterfaceType: | module<Foo> | getName: | Foo | getNumberOfInheritedTypes: | 0 | isBuiltinModule: | no | isSystemModule: | no | getNumberOfImportedModules: | 4 | getNumberOfExportedModules: | 1 |
1+
| file://:0:0:0:0 | Foo | getModule: | file://:0:0:0:0 | Foo | getNumberOfMembers: | 0 | getInterfaceType: | module<Foo> | getName: | Foo | getNumberOfInheritedTypes: | 0 | isBuiltinModule: | no | isSystemModule: | no | getNumberOfImportedModules: | 5 | getNumberOfExportedModules: | 1 |
22
| file://:0:0:0:0 | __ObjC | getModule: | file://:0:0:0:0 | __ObjC | getNumberOfMembers: | 0 | getInterfaceType: | module<__ObjC> | getName: | __ObjC | getNumberOfInheritedTypes: | 0 | isBuiltinModule: | no | isSystemModule: | no | getNumberOfImportedModules: | 1 | getNumberOfExportedModules: | 0 |
3-
| file://:0:0:0:0 | default_module_name | getModule: | file://:0:0:0:0 | default_module_name | getNumberOfMembers: | 0 | getInterfaceType: | module<default_module_name> | getName: | default_module_name | getNumberOfInheritedTypes: | 0 | isBuiltinModule: | no | isSystemModule: | no | getNumberOfImportedModules: | 4 | getNumberOfExportedModules: | 0 |
3+
| file://:0:0:0:0 | default_module_name | getModule: | file://:0:0:0:0 | default_module_name | getNumberOfMembers: | 0 | getInterfaceType: | module<default_module_name> | getName: | default_module_name | getNumberOfInheritedTypes: | 0 | isBuiltinModule: | no | isSystemModule: | no | getNumberOfImportedModules: | 5 | getNumberOfExportedModules: | 0 |

swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnImportedModule.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
| file://:0:0:0:0 | Foo | file://:0:0:0:0 | SwiftOnoneSupport |
33
| file://:0:0:0:0 | Foo | file://:0:0:0:0 | _Concurrency |
44
| file://:0:0:0:0 | Foo | file://:0:0:0:0 | _StringProcessing |
5+
| file://:0:0:0:0 | Foo | file://:0:0:0:0 | _SwiftConcurrencyShims |
56
| file://:0:0:0:0 | __ObjC | file://:0:0:0:0 | Swift |
67
| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | Swift |
78
| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | SwiftOnoneSupport |
89
| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | _Concurrency |
910
| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | _StringProcessing |
11+
| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | _SwiftConcurrencyShims |

swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getMember.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
| method_lookups.swift:44:11:44:13 | .foo(_:_:) | method_lookups.swift:12:3:12:35 | foo(_:_:) |
1717
| method_lookups.swift:47:1:47:1 | Task<Success, Never>.init(priority:operation:) | file://:0:0:0:0 | Task<Success, Never>.init(priority:operation:) |
1818
| method_lookups.swift:48:9:48:11 | .foo(_:_:) | method_lookups.swift:22:3:22:35 | foo(_:_:) |
19-
| method_lookups.swift:49:9:49:11 | .bar() | method_lookups.swift:23:3:23:21 | bar() |
19+
| method_lookups.swift:49:9:49:11 | .bar() | method_lookups.swift:23:15:23:33 | bar() |
2020
| method_lookups.swift:50:9:50:9 | Z.init() | method_lookups.swift:26:3:28:3 | Z.init() |
2121
| method_lookups.swift:50:9:50:13 | .baz(_:) | method_lookups.swift:24:3:24:21 | baz(_:) |
22-
| method_lookups.swift:52:11:52:13 | .bar() | method_lookups.swift:23:3:23:21 | bar() |
22+
| method_lookups.swift:52:11:52:13 | .bar() | method_lookups.swift:23:15:23:33 | bar() |
2323
| method_lookups.swift:53:18:53:18 | Z.init() | method_lookups.swift:26:3:28:3 | Z.init() |
2424
| method_lookups.swift:53:23:53:23 | .baz(_:) | method_lookups.swift:24:3:24:21 | baz(_:) |

swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
| method_lookups.swift:44:11:44:13 | .foo(_:_:) | (Int, Int) -> () |
2121
| method_lookups.swift:47:1:47:1 | Task<Success, Never>.init(priority:operation:) | (TaskPriority?, __owned @escaping @Sendable () async -> ()) -> Task<(), Never> |
2222
| method_lookups.swift:48:9:48:11 | .foo(_:_:) | @MainActor (Int, Int) -> () |
23-
| method_lookups.swift:49:9:49:11 | .bar() | @MainActor () -> () |
23+
| method_lookups.swift:49:9:49:11 | .bar() | () -> () |
2424
| method_lookups.swift:50:9:50:9 | Z.init() | @MainActor () -> Z |
2525
| method_lookups.swift:50:9:50:13 | .baz(_:) | @MainActor (Int) -> () |
2626
| method_lookups.swift:52:11:52:13 | .bar() | () -> () |

swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/method_lookups.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ actor Y {
2020
@MainActor
2121
class Z {
2222
static func foo(_: Int, _:Int) {}
23-
class func bar() {}
23+
nonisolated class func bar() {}
2424
func baz(_: Int) {}
2525

2626
init() {

swift/ql/test/library-tests/ast/PrintAst.expected

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3248,51 +3248,49 @@ cfg.swift:
32483248
# 524| getParam(0): [ParamDecl] continuation
32493249
# 524| Type = AsyncStream<Int>.Continuation
32503250
# 523| getBody(): [BraceStmt] { ... }
3251-
# 525| getElement(0): [BraceStmt] { ... }
3252-
# 525| getElement(0): [CallExpr] call to detached(priority:operation:)
3253-
# 525| getFunction(): [MethodLookupExpr] .detached(priority:operation:)
3254-
# 525| getBase(): [TypeExpr] Task<(), Never>.Type
3255-
# 525| getTypeRepr(): [TypeRepr] Task<(), Never>
3256-
# 525| getMethodRef(): [DeclRefExpr] detached(priority:operation:)
3257-
# 525| getArgument(0): [Argument] priority: default priority
3258-
# 525| getExpr(): [DefaultArgumentExpr] default priority
3259-
# 525| getArgument(1): [Argument] operation: { ... }
3260-
# 525| getExpr(): [ExplicitClosureExpr] { ... }
3261-
# 525| getBody(): [BraceStmt] { ... }
3262-
# 526| getElement(0): [ForEachStmt] for ... in ... { ... }
3263-
# 526| getPattern(): [NamedPattern] i
3264-
#-----| getIteratorVar(): [PatternBindingDecl] var ... = ...
3265-
# 526| getInit(0): [CallExpr] call to makeIterator()
3266-
# 526| getFunction(): [MethodLookupExpr] .makeIterator()
3267-
# 526| getBase(): [BinaryExpr] ... ....(_:_:) ...
3268-
# 526| getFunction(): [MethodLookupExpr] ....(_:_:)
3269-
# 526| getBase(): [TypeExpr] Int.Type
3270-
# 526| getTypeRepr(): [TypeRepr] Int
3271-
# 526| getMethodRef(): [DeclRefExpr] ...(_:_:)
3272-
# 526| getArgument(0): [Argument] : 1
3273-
# 526| getExpr(): [IntegerLiteralExpr] 1
3274-
# 526| getArgument(1): [Argument] : 100
3275-
# 526| getExpr(): [IntegerLiteralExpr] 100
3276-
#-----| getMethodRef(): [DeclRefExpr] makeIterator()
3277-
# 526| getPattern(0): [NamedPattern] $i$generator
3278-
# 526| getNextCall(): [CallExpr] call to next()
3279-
# 526| getFunction(): [MethodLookupExpr] .next()
3280-
# 526| getBase(): [DeclRefExpr] $i$generator
3281-
# 526| getBase().getFullyConverted(): [InOutExpr] &...
3282-
#-----| getMethodRef(): [DeclRefExpr] next()
3283-
# 526| getBody(): [BraceStmt] { ... }
3284-
# 527| getElement(0): [CallExpr] call to yield(_:)
3285-
# 527| getFunction(): [MethodLookupExpr] .yield(_:)
3286-
# 527| getBase(): [DeclRefExpr] continuation
3287-
# 527| getMethodRef(): [DeclRefExpr] yield(_:)
3288-
# 527| getArgument(0): [Argument] : i
3289-
# 527| getExpr(): [DeclRefExpr] i
3290-
# 529| getElement(1): [CallExpr] call to finish()
3291-
# 529| getFunction(): [MethodLookupExpr] .finish()
3292-
# 529| getBase(): [DeclRefExpr] continuation
3293-
# 529| getMethodRef(): [DeclRefExpr] finish()
3294-
# 527| getCapture(0): [CapturedDecl] continuation
3295-
# 525| getElement(1): [ReturnStmt] return
3251+
# 525| getElement(0): [CallExpr] call to detached(priority:operation:)
3252+
# 525| getFunction(): [MethodLookupExpr] .detached(priority:operation:)
3253+
# 525| getBase(): [TypeExpr] Task<(), Never>.Type
3254+
# 525| getTypeRepr(): [TypeRepr] Task<(), Never>
3255+
# 525| getMethodRef(): [DeclRefExpr] detached(priority:operation:)
3256+
# 525| getArgument(0): [Argument] priority: default priority
3257+
# 525| getExpr(): [DefaultArgumentExpr] default priority
3258+
# 525| getArgument(1): [Argument] operation: { ... }
3259+
# 525| getExpr(): [ExplicitClosureExpr] { ... }
3260+
# 525| getBody(): [BraceStmt] { ... }
3261+
# 526| getElement(0): [ForEachStmt] for ... in ... { ... }
3262+
# 526| getPattern(): [NamedPattern] i
3263+
#-----| getIteratorVar(): [PatternBindingDecl] var ... = ...
3264+
# 526| getInit(0): [CallExpr] call to makeIterator()
3265+
# 526| getFunction(): [MethodLookupExpr] .makeIterator()
3266+
# 526| getBase(): [BinaryExpr] ... ....(_:_:) ...
3267+
# 526| getFunction(): [MethodLookupExpr] ....(_:_:)
3268+
# 526| getBase(): [TypeExpr] Int.Type
3269+
# 526| getTypeRepr(): [TypeRepr] Int
3270+
# 526| getMethodRef(): [DeclRefExpr] ...(_:_:)
3271+
# 526| getArgument(0): [Argument] : 1
3272+
# 526| getExpr(): [IntegerLiteralExpr] 1
3273+
# 526| getArgument(1): [Argument] : 100
3274+
# 526| getExpr(): [IntegerLiteralExpr] 100
3275+
#-----| getMethodRef(): [DeclRefExpr] makeIterator()
3276+
# 526| getPattern(0): [NamedPattern] $i$generator
3277+
# 526| getNextCall(): [CallExpr] call to next()
3278+
# 526| getFunction(): [MethodLookupExpr] .next()
3279+
# 526| getBase(): [DeclRefExpr] $i$generator
3280+
# 526| getBase().getFullyConverted(): [InOutExpr] &...
3281+
#-----| getMethodRef(): [DeclRefExpr] next()
3282+
# 526| getBody(): [BraceStmt] { ... }
3283+
# 527| getElement(0): [CallExpr] call to yield(_:)
3284+
# 527| getFunction(): [MethodLookupExpr] .yield(_:)
3285+
# 527| getBase(): [DeclRefExpr] continuation
3286+
# 527| getMethodRef(): [DeclRefExpr] yield(_:)
3287+
# 527| getArgument(0): [Argument] : i
3288+
# 527| getExpr(): [DeclRefExpr] i
3289+
# 529| getElement(1): [CallExpr] call to finish()
3290+
# 529| getFunction(): [MethodLookupExpr] .finish()
3291+
# 529| getBase(): [DeclRefExpr] continuation
3292+
# 529| getMethodRef(): [DeclRefExpr] finish()
3293+
# 527| getCapture(0): [CapturedDecl] continuation
32963294
# 523| getPattern(0): [NamedPattern] stream
32973295
# 533| getElement(1): [ForEachStmt] for ... in ... { ... }
32983296
# 533| getPattern(): [NamedPattern] i

swift/ql/test/library-tests/controlflow/graph/Cfg.expected

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6077,14 +6077,11 @@ cfg.swift:
60776077
# 525| Task<(), Never>.Type
60786078
#-----| -> default priority
60796079

6080-
# 525| return
6081-
#-----| return -> exit { ... } (normal)
6082-
60836080
# 525| .detached(priority:operation:)
60846081
#-----| -> Task<(), Never>.Type
60856082

60866083
# 525| call to detached(priority:operation:)
6087-
#-----| -> return
6084+
#-----| -> exit { ... } (normal)
60886085

60896086
# 525| default priority
60906087
#-----| -> { ... }

swift/ql/test/library-tests/elements/expr/methodlookup/PrintAst.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ methodlookup.swift:
226226
# 47| getFunction(): [MethodLookupExpr] .instanceMethod()
227227
# 47| getBase(): [DeclRefExpr] baz
228228
# 47| getMethodRef(): [DeclRefExpr] instanceMethod()
229-
# 47| getMethodRef().getFullyConverted(): [FunctionConversionExpr] ((Baz) -> @MainActor () -> ()) ...
230229
# 47| getElement(2).getFullyConverted(): [AwaitExpr] await ...
231230
# 48| getElement(3): [CallExpr] call to { ... }
232231
# 48| getFunction(): [CallExpr] call to Baz.instanceMethod()

swift/ql/test/library-tests/elements/expr/methodlookup/methodlookup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ actor Bar {
1414
@MainActor
1515
class Baz {
1616
init() {}
17-
func instanceMethod() {}
17+
nonisolated func instanceMethod() {}
1818
static func staticMethod() {}
1919
class func classMethod() {}
2020
}

swift/third_party/load.bzl

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
22
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
33

4-
# TODO: remove `remove-result-of.patch` once we update to a Swift version containing
5-
# https://github.com/apple/swift/commit/2ed2cea2
6-
# (probably when updating to 5.9)
7-
_swift_prebuilt_version = "swift-5.8.1-RELEASE.214"
4+
_swift_prebuilt_version = "swift-5.9.1-RELEASE.255"
85
_swift_sha_map = {
9-
"Linux-X64": "009594131d2f6327e0033c4b7b0479a5730427575eb59a81a439fe0e343aa777",
10-
"macOS-ARM64": "304a918e3699d404f57e967eff79b982388d8c5330c2135272c9f3a825920a39",
11-
"macOS-X64": "c763c493e5782869b54887dc72df2aad00d59af7272c6d96377f1debb98741f2",
6+
"Linux-X64": "0d5682d8acbe3ab81c2a0b8dc0dfadc0240895e28722cca6467d2ab71a69e004",
7+
"macOS-ARM64": "ee53def6f89f97ce0882375121629d71fd87a673baa194f4c510920720d7bce6",
8+
"macOS-X64": "61c2879ee89d6796f3b58fada8a5890756f5a8c053597f4faca019d660743d70",
129
}
1310

1411
_swift_arch_map = {
@@ -23,13 +20,13 @@ _toolchain_info = {
2320
platform = "ubuntu2004",
2421
suffix = "ubuntu20.04",
2522
extension = "tar.gz",
26-
sha = "dd4b04c7f95c4ada4a2aacb66864b1ed20358313aaa4c880dc3974bf1eefa275",
23+
sha = "057f6c0c3c6472b733e4d5bd8f10e83dd8536c1db1d0ec4a1dca414cd023ab0d",
2724
),
2825
"macos": struct(
2926
platform = "xcode",
3027
suffix = "osx",
3128
extension = "pkg",
32-
sha = "417d46f73b2e6b5da82ebbc8a5f4979f7187691fd42119157ba56d5a8bc89eda",
29+
sha = "fa4d3a67c4db8d63897e10d52903af40599cc351e8a73d6f5a4eb3cfd07c4605",
3330
),
3431
}
3532

@@ -131,7 +128,6 @@ def load_dependencies(workspace_name):
131128
patches = [
132129
"@%s//swift/third_party/swift-llvm-support:patches/%s.patch" % (workspace_name, patch_name)
133130
for patch_name in (
134-
"remove-result-of",
135131
"remove-redundant-operators",
136132
"add-constructor-to-Compilation",
137133
)

0 commit comments

Comments
 (0)