From 96b544fa6a0f6691a607a1e632594d8a07416cd6 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:17:38 -0400 Subject: [PATCH 01/44] spelling: availability Signed-off-by: Josh Soref --- lib/PrintAsClang/DeclAndTypePrinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PrintAsClang/DeclAndTypePrinter.cpp b/lib/PrintAsClang/DeclAndTypePrinter.cpp index 598cfe2ba9be1..d8c2ec7d5baa5 100644 --- a/lib/PrintAsClang/DeclAndTypePrinter.cpp +++ b/lib/PrintAsClang/DeclAndTypePrinter.cpp @@ -289,7 +289,7 @@ class DeclAndTypePrinter::Implementation printDocumentationComment(CD); // This is just for testing, so we check explicitly for the attribute instead - // of asking if the class is weak imported. If the class has availablility, + // of asking if the class is weak imported. If the class has availability, // we'll print a SWIFT_AVAIALBLE() which implies __attribute__((weak_imported)) // already. if (CD->getAttrs().hasAttribute()) From a3d6dcbfec06a0ace5a9d545346edb303f06d5fb Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:17:53 -0400 Subject: [PATCH 02/44] spelling: available Signed-off-by: Josh Soref --- lib/PrintAsClang/DeclAndTypePrinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PrintAsClang/DeclAndTypePrinter.cpp b/lib/PrintAsClang/DeclAndTypePrinter.cpp index d8c2ec7d5baa5..ad9b9a62bf5ac 100644 --- a/lib/PrintAsClang/DeclAndTypePrinter.cpp +++ b/lib/PrintAsClang/DeclAndTypePrinter.cpp @@ -290,7 +290,7 @@ class DeclAndTypePrinter::Implementation // This is just for testing, so we check explicitly for the attribute instead // of asking if the class is weak imported. If the class has availability, - // we'll print a SWIFT_AVAIALBLE() which implies __attribute__((weak_imported)) + // we'll print a SWIFT_AVAILABLE() which implies __attribute__((weak_imported)) // already. if (CD->getAttrs().hasAttribute()) os << "SWIFT_WEAK_IMPORT\n"; From 039ad710755e2803224282abc34afc8934f12c00 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:18:10 -0400 Subject: [PATCH 03/44] spelling: because Signed-off-by: Josh Soref --- .../swift_build_sdk_interfaces/compiler-crash-windows.test-sh | 2 +- test/SymbolGraph/Symbols/SkipsSPI.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ModuleInterface/swift_build_sdk_interfaces/compiler-crash-windows.test-sh b/test/ModuleInterface/swift_build_sdk_interfaces/compiler-crash-windows.test-sh index 022ffea70e1a5..9356058d35c9c 100644 --- a/test/ModuleInterface/swift_build_sdk_interfaces/compiler-crash-windows.test-sh +++ b/test/ModuleInterface/swift_build_sdk_interfaces/compiler-crash-windows.test-sh @@ -1,4 +1,4 @@ -# This test is intentionally specialized on windows becauase not --crash behaves +# This test is intentionally specialized on windows because not --crash behaves # differently there. The exit code from the crashing frontend invocations is # mapped to `-21` there, which lit's `not` along does not remap correctly. # See rdar://59397376 diff --git a/test/SymbolGraph/Symbols/SkipsSPI.swift b/test/SymbolGraph/Symbols/SkipsSPI.swift index 716c2733e3561..e991e993d2e4a 100644 --- a/test/SymbolGraph/Symbols/SkipsSPI.swift +++ b/test/SymbolGraph/Symbols/SkipsSPI.swift @@ -29,11 +29,11 @@ public class ClassShouldntAppear {} // This struct should appear public struct StructShouldAppear { - // This shouldn't appear beacause it is @_spi(OtherModule), despite `StructShouldAppear`. + // This shouldn't appear because it is @_spi(OtherModule), despite `StructShouldAppear`. @_spi(OtherModule) public func functionShouldntAppear() {} - // This shouldn't appear beacause it is @_spi(OtherModule), despite `StructShouldAppear`. + // This shouldn't appear because it is @_spi(OtherModule), despite `StructShouldAppear`. @_spi(OtherModule) public struct InnerStructShouldntAppear {} } From 4d55a1975f4c7d66c1e9ddeb9d9053cf5306db1a Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Mon, 18 Apr 2022 22:11:22 -0400 Subject: [PATCH 04/44] spelling: completion Signed-off-by: Josh Soref --- docs/proposals/Accessors.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/proposals/Accessors.rst b/docs/proposals/Accessors.rst index 93c78ad15488d..f07e22407808d 100644 --- a/docs/proposals/Accessors.rst +++ b/docs/proposals/Accessors.rst @@ -430,7 +430,7 @@ and crashes are acceptable in their wake.) However, addressors are not atomic in this way: they return an address to the caller, which may then interleave arbitrary code before -completing the operation. This can present the opportunity for +completion the operation. This can present the opportunity for corruption if the interleaved code modifies the original value. Consider the following code:: From ad0c427e5f2356ad620a4cafb4e3c15899daa2cb Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:23:56 -0400 Subject: [PATCH 05/44] spelling: declaring Signed-off-by: Josh Soref --- test/CrossImport/remark-option.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CrossImport/remark-option.swift b/test/CrossImport/remark-option.swift index 571b839e51cc9..820fd287017b2 100644 --- a/test/CrossImport/remark-option.swift +++ b/test/CrossImport/remark-option.swift @@ -4,6 +4,6 @@ // RUN: %target-typecheck-verify-swift -enable-cross-import-overlays -Rcross-import -I %t/include -I %t/lib/swift -F %t/Frameworks import DeclaringLibrary -// FIXME: Similarly to horrible.swift, ideally we would emit this remark on DelcaringLibrary +// FIXME: Similarly to horrible.swift, ideally we would emit this remark on DeclaringLibrary // decl, since the cross-import overlay actually belongs to the DeclaringLibrary. (SR-12223) import BystandingLibrary // expected-remark {{import of 'DeclaringLibrary' and 'BystandingLibrary' triggered a cross-import of '_OverlayLibrary'}} From 60a2e451eaf3b99432f0842dfbf8d1f2f106f264 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:25:53 -0400 Subject: [PATCH 06/44] spelling: diagnose Signed-off-by: Josh Soref --- CMakeLists.txt | 2 +- .../Sources/AST/CMakeLists.txt | 2 +- .../Sources/AST/DiagnosticEngine.swift | 52 +++++++++---------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 06e1f3f94b93c..9aaa9c344a07c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1154,7 +1154,7 @@ if(SWIFT_INCLUDE_TOOLS) # frontend is being built, so trying to include them for other builds # (like stdlib) fail! # - # Diagnostics information is only useful for the frontend compiler + # Diagnoseics information is only useful for the frontend compiler # anyway, so let's only include it if the compiler is being built, # which at the moment seems like if SWIFT_INCLUDE_TOOLS is defined. add_subdirectory(localization) diff --git a/SwiftCompilerSources/Sources/AST/CMakeLists.txt b/SwiftCompilerSources/Sources/AST/CMakeLists.txt index 3d814cad0a6c4..8053228ae7313 100644 --- a/SwiftCompilerSources/Sources/AST/CMakeLists.txt +++ b/SwiftCompilerSources/Sources/AST/CMakeLists.txt @@ -10,5 +10,5 @@ add_swift_compiler_module(AST DEPENDS Basic SOURCES - DiagnosticEngine.swift) + DiagnoseicEngine.swift) diff --git a/SwiftCompilerSources/Sources/AST/DiagnosticEngine.swift b/SwiftCompilerSources/Sources/AST/DiagnosticEngine.swift index 133ba17979066..91592b94a7c2a 100644 --- a/SwiftCompilerSources/Sources/AST/DiagnosticEngine.swift +++ b/SwiftCompilerSources/Sources/AST/DiagnosticEngine.swift @@ -1,4 +1,4 @@ -//===--- DiagnosticEngine.swift -------------------------------------------===// +//===--- DiagnoseicEngine.swift -------------------------------------------===// // // This source file is part of the Swift.org open source project // @@ -16,7 +16,7 @@ import Basic public typealias DiagID = BridgedDiagID -extension BridgedDiagnosticArgument { +extension BridgedDiagnoseicArgument { init(stringRef val: BridgedStringRef) { self.init(kind: .stringRef, value: .init(stringRefValue: val)) } @@ -25,21 +25,21 @@ extension BridgedDiagnosticArgument { } } -public protocol DiagnosticArgument { - func _withBridgedDiagnosticArgument(_ fn: (BridgedDiagnosticArgument) -> Void) +public protocol DiagnoseicArgument { + func _withBridgedDiagnoseicArgument(_ fn: (BridgedDiagnoseicArgument) -> Void) } -extension String: DiagnosticArgument { - public func _withBridgedDiagnosticArgument(_ fn: (BridgedDiagnosticArgument) -> Void) { - withBridgedStringRef { fn(BridgedDiagnosticArgument(stringRef: $0)) } +extension String: DiagnoseicArgument { + public func _withBridgedDiagnoseicArgument(_ fn: (BridgedDiagnoseicArgument) -> Void) { + withBridgedStringRef { fn(BridgedDiagnoseicArgument(stringRef: $0)) } } } -extension Int: DiagnosticArgument { - public func _withBridgedDiagnosticArgument(_ fn: (BridgedDiagnosticArgument) -> Void) { - fn(BridgedDiagnosticArgument(int: self)) +extension Int: DiagnoseicArgument { + public func _withBridgedDiagnoseicArgument(_ fn: (BridgedDiagnoseicArgument) -> Void) { + fn(BridgedDiagnoseicArgument(int: self)) } } -public struct DiagnosticFixIt { +public struct DiagnoseicFixIt { public let start: SourceLoc public let byteLength: Int public let text: String @@ -50,21 +50,21 @@ public struct DiagnosticFixIt { self.text = text } - func withBridgedDiagnosticFixIt(_ fn: (BridgedDiagnosticFixIt) -> Void) { + func withBridgedDiagnoseicFixIt(_ fn: (BridgedDiagnoseicFixIt) -> Void) { text.withBridgedStringRef { bridgedTextRef in - let bridgedDiagnosticFixIt = BridgedDiagnosticFixIt( + let bridgedDiagnoseicFixIt = BridgedDiagnoseicFixIt( start: start.bridged, byteLength: byteLength, text: bridgedTextRef) - fn(bridgedDiagnosticFixIt) + fn(bridgedDiagnoseicFixIt) } } } -public struct DiagnosticEngine { - private let bridged: BridgedDiagnosticEngine +public struct DiagnoseicEngine { + private let bridged: BridgedDiagnoseicEngine - public init(bridged: BridgedDiagnosticEngine) { + public init(bridged: BridgedDiagnoseicEngine) { self.bridged = bridged } public init?(bridged: BridgedOptionalDiagnosticEngine) { @@ -76,14 +76,14 @@ public struct DiagnosticEngine { public func diagnose(_ position: SourceLoc?, _ id: DiagID, - _ args: [DiagnosticArgument], + _ args: [DiagnoseicArgument], highlight: CharSourceRange? = nil, - fixIts: [DiagnosticFixIt] = []) { + fixIts: [DiagnoseicFixIt] = []) { let bridgedSourceLoc: BridgedSourceLoc = position.bridged let bridgedHighlightRange: BridgedCharSourceRange = highlight.bridged - var bridgedArgs: [BridgedDiagnosticArgument] = [] - var bridgedFixIts: [BridgedDiagnosticFixIt] = [] + var bridgedArgs: [BridgedDiagnoseicArgument] = [] + var bridgedFixIts: [BridgedDiagnoseicFixIt] = [] // Build a higher-order function to wrap every 'withBridgedXXX { ... }' // calls, so we don't escape anything from the closure. 'bridgedArgs' and @@ -93,7 +93,7 @@ public struct DiagnosticEngine { var closure: () -> Void = { bridgedArgs.withBridgedArrayRef { bridgedArgsRef in bridgedFixIts.withBridgedArrayRef { bridgedFixItsRef in - DiagnosticEngine_diagnose(bridged, bridgedSourceLoc, + DiagnoseicEngine_diagnose(bridged, bridgedSourceLoc, id, bridgedArgsRef, bridgedHighlightRange, bridgedFixItsRef) } @@ -102,7 +102,7 @@ public struct DiagnosticEngine { // 'reversed()' because the closure should be wrapped in that order. for arg in args.reversed() { closure = { [closure, arg] in - arg._withBridgedDiagnosticArgument { bridgedArg in + arg._withBridgedDiagnoseicArgument { bridgedArg in bridgedArgs.append(bridgedArg) closure() } @@ -111,7 +111,7 @@ public struct DiagnosticEngine { // 'reversed()' because the closure should be wrapped in that order. for fixIt in fixIts.reversed() { closure = { [closure, fixIt] in - fixIt.withBridgedDiagnosticFixIt { bridgedFixIt in + fixIt.withBridgedDiagnoseicFixIt { bridgedFixIt in bridgedFixIts.append(bridgedFixIt) closure() } @@ -123,9 +123,9 @@ public struct DiagnosticEngine { public func diagnose(_ position: SourceLoc?, _ id: DiagID, - _ args: DiagnosticArgument..., + _ args: DiagnoseicArgument..., highlight: CharSourceRange? = nil, - fixIts: DiagnosticFixIt...) { + fixIts: DiagnoseicFixIt...) { diagnose(position, id, args, highlight: highlight, fixIts: fixIts) } } From 89e79540c12847b6408928338a98cb3b22c1e703 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:25:57 -0400 Subject: [PATCH 07/44] spelling: diagnostic Signed-off-by: Josh Soref --- CMakeLists.txt | 2 +- .../Sources/AST/CMakeLists.txt | 2 +- .../Sources/AST/DiagnosticEngine.swift | 52 +++++++++---------- lib/Localization/LocalizationFormat.cpp | 2 +- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9aaa9c344a07c..06e1f3f94b93c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1154,7 +1154,7 @@ if(SWIFT_INCLUDE_TOOLS) # frontend is being built, so trying to include them for other builds # (like stdlib) fail! # - # Diagnoseics information is only useful for the frontend compiler + # Diagnostics information is only useful for the frontend compiler # anyway, so let's only include it if the compiler is being built, # which at the moment seems like if SWIFT_INCLUDE_TOOLS is defined. add_subdirectory(localization) diff --git a/SwiftCompilerSources/Sources/AST/CMakeLists.txt b/SwiftCompilerSources/Sources/AST/CMakeLists.txt index 8053228ae7313..3d814cad0a6c4 100644 --- a/SwiftCompilerSources/Sources/AST/CMakeLists.txt +++ b/SwiftCompilerSources/Sources/AST/CMakeLists.txt @@ -10,5 +10,5 @@ add_swift_compiler_module(AST DEPENDS Basic SOURCES - DiagnoseicEngine.swift) + DiagnosticEngine.swift) diff --git a/SwiftCompilerSources/Sources/AST/DiagnosticEngine.swift b/SwiftCompilerSources/Sources/AST/DiagnosticEngine.swift index 91592b94a7c2a..133ba17979066 100644 --- a/SwiftCompilerSources/Sources/AST/DiagnosticEngine.swift +++ b/SwiftCompilerSources/Sources/AST/DiagnosticEngine.swift @@ -1,4 +1,4 @@ -//===--- DiagnoseicEngine.swift -------------------------------------------===// +//===--- DiagnosticEngine.swift -------------------------------------------===// // // This source file is part of the Swift.org open source project // @@ -16,7 +16,7 @@ import Basic public typealias DiagID = BridgedDiagID -extension BridgedDiagnoseicArgument { +extension BridgedDiagnosticArgument { init(stringRef val: BridgedStringRef) { self.init(kind: .stringRef, value: .init(stringRefValue: val)) } @@ -25,21 +25,21 @@ extension BridgedDiagnoseicArgument { } } -public protocol DiagnoseicArgument { - func _withBridgedDiagnoseicArgument(_ fn: (BridgedDiagnoseicArgument) -> Void) +public protocol DiagnosticArgument { + func _withBridgedDiagnosticArgument(_ fn: (BridgedDiagnosticArgument) -> Void) } -extension String: DiagnoseicArgument { - public func _withBridgedDiagnoseicArgument(_ fn: (BridgedDiagnoseicArgument) -> Void) { - withBridgedStringRef { fn(BridgedDiagnoseicArgument(stringRef: $0)) } +extension String: DiagnosticArgument { + public func _withBridgedDiagnosticArgument(_ fn: (BridgedDiagnosticArgument) -> Void) { + withBridgedStringRef { fn(BridgedDiagnosticArgument(stringRef: $0)) } } } -extension Int: DiagnoseicArgument { - public func _withBridgedDiagnoseicArgument(_ fn: (BridgedDiagnoseicArgument) -> Void) { - fn(BridgedDiagnoseicArgument(int: self)) +extension Int: DiagnosticArgument { + public func _withBridgedDiagnosticArgument(_ fn: (BridgedDiagnosticArgument) -> Void) { + fn(BridgedDiagnosticArgument(int: self)) } } -public struct DiagnoseicFixIt { +public struct DiagnosticFixIt { public let start: SourceLoc public let byteLength: Int public let text: String @@ -50,21 +50,21 @@ public struct DiagnoseicFixIt { self.text = text } - func withBridgedDiagnoseicFixIt(_ fn: (BridgedDiagnoseicFixIt) -> Void) { + func withBridgedDiagnosticFixIt(_ fn: (BridgedDiagnosticFixIt) -> Void) { text.withBridgedStringRef { bridgedTextRef in - let bridgedDiagnoseicFixIt = BridgedDiagnoseicFixIt( + let bridgedDiagnosticFixIt = BridgedDiagnosticFixIt( start: start.bridged, byteLength: byteLength, text: bridgedTextRef) - fn(bridgedDiagnoseicFixIt) + fn(bridgedDiagnosticFixIt) } } } -public struct DiagnoseicEngine { - private let bridged: BridgedDiagnoseicEngine +public struct DiagnosticEngine { + private let bridged: BridgedDiagnosticEngine - public init(bridged: BridgedDiagnoseicEngine) { + public init(bridged: BridgedDiagnosticEngine) { self.bridged = bridged } public init?(bridged: BridgedOptionalDiagnosticEngine) { @@ -76,14 +76,14 @@ public struct DiagnoseicEngine { public func diagnose(_ position: SourceLoc?, _ id: DiagID, - _ args: [DiagnoseicArgument], + _ args: [DiagnosticArgument], highlight: CharSourceRange? = nil, - fixIts: [DiagnoseicFixIt] = []) { + fixIts: [DiagnosticFixIt] = []) { let bridgedSourceLoc: BridgedSourceLoc = position.bridged let bridgedHighlightRange: BridgedCharSourceRange = highlight.bridged - var bridgedArgs: [BridgedDiagnoseicArgument] = [] - var bridgedFixIts: [BridgedDiagnoseicFixIt] = [] + var bridgedArgs: [BridgedDiagnosticArgument] = [] + var bridgedFixIts: [BridgedDiagnosticFixIt] = [] // Build a higher-order function to wrap every 'withBridgedXXX { ... }' // calls, so we don't escape anything from the closure. 'bridgedArgs' and @@ -93,7 +93,7 @@ public struct DiagnoseicEngine { var closure: () -> Void = { bridgedArgs.withBridgedArrayRef { bridgedArgsRef in bridgedFixIts.withBridgedArrayRef { bridgedFixItsRef in - DiagnoseicEngine_diagnose(bridged, bridgedSourceLoc, + DiagnosticEngine_diagnose(bridged, bridgedSourceLoc, id, bridgedArgsRef, bridgedHighlightRange, bridgedFixItsRef) } @@ -102,7 +102,7 @@ public struct DiagnoseicEngine { // 'reversed()' because the closure should be wrapped in that order. for arg in args.reversed() { closure = { [closure, arg] in - arg._withBridgedDiagnoseicArgument { bridgedArg in + arg._withBridgedDiagnosticArgument { bridgedArg in bridgedArgs.append(bridgedArg) closure() } @@ -111,7 +111,7 @@ public struct DiagnoseicEngine { // 'reversed()' because the closure should be wrapped in that order. for fixIt in fixIts.reversed() { closure = { [closure, fixIt] in - fixIt.withBridgedDiagnoseicFixIt { bridgedFixIt in + fixIt.withBridgedDiagnosticFixIt { bridgedFixIt in bridgedFixIts.append(bridgedFixIt) closure() } @@ -123,9 +123,9 @@ public struct DiagnoseicEngine { public func diagnose(_ position: SourceLoc?, _ id: DiagID, - _ args: DiagnoseicArgument..., + _ args: DiagnosticArgument..., highlight: CharSourceRange? = nil, - fixIts: DiagnoseicFixIt...) { + fixIts: DiagnosticFixIt...) { diagnose(position, id, args, highlight: highlight, fixIts: fixIts) } } diff --git a/lib/Localization/LocalizationFormat.cpp b/lib/Localization/LocalizationFormat.cpp index 249b094d248d9..53c47c880d4d4 100644 --- a/lib/Localization/LocalizationFormat.cpp +++ b/lib/Localization/LocalizationFormat.cpp @@ -231,7 +231,7 @@ readYAML(llvm::yaml::IO &io, T &Seq, T &unknownIDs, bool, Context &Ctx) { io.beginMapping(); // If the current diagnostic ID is available in YAML and in `.def`, add it - // to the diagnostics array. Otherwise, re-parse the current diagnnostic + // to the diagnostics array. Otherwise, re-parse the current diagnostic // id as a string and store it in `unknownIDs` array. if (auto id = LocalizationInput::readID(io)) { // YAML file isn't guaranteed to have diagnostics in order of their From 7c9797305de009ad39bb74b472689676b3d7d349 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:26:23 -0400 Subject: [PATCH 08/44] spelling: dictionary Signed-off-by: Josh Soref --- test/swift-indent/basic.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/swift-indent/basic.swift b/test/swift-indent/basic.swift index e1a837f4b0324..89c3bdf7c1eb4 100644 --- a/test/swift-indent/basic.swift +++ b/test/swift-indent/basic.swift @@ -407,7 +407,7 @@ func a() { } -// Array/Dictionay/Tuple/Closure within arg list shouldn't cause their solo +// Array/Dictionary/Tuple/Closure within arg list shouldn't cause their solo // closing tokens to indent. // foo(a: [ From 3e9aaf3ddaa9fb95e55388581a4d0a64b2992cba Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:26:33 -0400 Subject: [PATCH 09/44] spelling: differentiate Signed-off-by: Josh Soref --- lib/SyntaxParse/SyntaxTreeCreator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SyntaxParse/SyntaxTreeCreator.cpp b/lib/SyntaxParse/SyntaxTreeCreator.cpp index d2ea26f67d495..9fffd91a905f0 100644 --- a/lib/SyntaxParse/SyntaxTreeCreator.cpp +++ b/lib/SyntaxParse/SyntaxTreeCreator.cpp @@ -199,14 +199,14 @@ OpaqueSyntaxNode SyntaxTreeCreator::makeDeferredLayout( OpaqueSyntaxNode SyntaxTreeCreator::recordDeferredToken(OpaqueSyntaxNode deferred) { - // We don't diffirentiate between deferred and recorded nodes. See comment in + // We don't differentiate between deferred and recorded nodes. See comment in // makeDeferredToken. return deferred; } OpaqueSyntaxNode SyntaxTreeCreator::recordDeferredLayout(OpaqueSyntaxNode deferred) { - // We don't diffirentiate between deferred and recorded nodes. See comment in + // We don't differentiate between deferred and recorded nodes. See comment in // makeDeferredToken. return deferred; } From 64cc86eeda2e1ed51c32f714166172b9ac03bee4 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:26:42 -0400 Subject: [PATCH 10/44] spelling: disable Signed-off-by: Josh Soref --- test/lit.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lit.cfg b/test/lit.cfg index 091d21e5c33ee..d79bef2d8f725 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -2454,7 +2454,7 @@ config.substitutions.append(('%raw-FileCheck', shell_quote(config.filecheck))) config.substitutions.append(('%import-libdispatch', getattr(config, 'import_libdispatch', ''))) config.substitutions.append(('%import-static-libdispatch', getattr(config, 'import_libdispatch_static', ''))) -# Disabe COW sanity checks in the swift runtime by default. +# Disable COW sanity checks in the swift runtime by default. # (But it's required to set this environment variable to something) config.environment['SWIFT_DEBUG_ENABLE_COW_CHECKS'] = 'false' From 3e552758f96b6e3c6a7b7a2650aadc9a3065936f Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:27:26 -0400 Subject: [PATCH 11/44] spelling: dummy Signed-off-by: Josh Soref --- test/Migrator/swift_version_change.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Migrator/swift_version_change.swift b/test/Migrator/swift_version_change.swift index 031910de388b5..244be5934c859 100644 --- a/test/Migrator/swift_version_change.swift +++ b/test/Migrator/swift_version_change.swift @@ -1,5 +1,5 @@ // REQUIRES: OS=macosx -// RUN: %empty-directory(%t) && %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/dummpy.result -swift-version 4 %api_diff_data_dir -// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/dummpy.result -swift-version 5 %api_diff_data_dir +// RUN: %empty-directory(%t) && %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/dummy.result -swift-version 4 %api_diff_data_dir +// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/dummy.result -swift-version 5 %api_diff_data_dir func foo() {} From c39779edab977bbeb189bb469bbdeb39ec4c8e9a Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:29:10 -0400 Subject: [PATCH 12/44] spelling: existence Signed-off-by: Josh Soref --- lib/Option/SanitizerOptions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Option/SanitizerOptions.cpp b/lib/Option/SanitizerOptions.cpp index 94a02095c363c..f27c1640bd6a9 100644 --- a/lib/Option/SanitizerOptions.cpp +++ b/lib/Option/SanitizerOptions.cpp @@ -141,7 +141,7 @@ OptionSet swift::parseSanitizerArgValues( } SanitizerKind kind = optKind.getValue(); - // Support is determined by existance of the sanitizer library. + // Support is determined by existence of the sanitizer library. auto fileName = toFileName(kind); bool isShared = (kind != SanitizerKind::Fuzzer); bool sanitizerSupported = sanitizerRuntimeLibExists(fileName, isShared); From 41366d514ea1a9f67d54bebfde732e7990afb9e4 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:29:43 -0400 Subject: [PATCH 13/44] spelling: explicitly Signed-off-by: Josh Soref --- test/SILGen/sil_locations.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/SILGen/sil_locations.swift b/test/SILGen/sil_locations.swift index bf93823aa55e8..95c1f988568db 100644 --- a/test/SILGen/sil_locations.swift +++ b/test/SILGen/sil_locations.swift @@ -109,7 +109,7 @@ func multipleReturnsImplicitAndExplicit() { return } x += 1 - // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations34multipleReturnsImplicitAndExplicityyF + // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations34multipleReturnsImplicitAndExplicitlyyF // CHECK: cond_br // CHECK: br bb{{[0-9]+}}, loc "{{.*}}":[[@LINE-5]]:5, {{.*}}:return // CHECK: br bb{{[0-9]+}}, loc "{{.*}}":[[@LINE+2]]:1, {{.*}}:imp_return From 3ae9e39f5d1d37be6ceec5883511647271f6ea27 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:30:07 -0400 Subject: [PATCH 14/44] spelling: expressions Signed-off-by: Josh Soref --- test/expr/expressions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/expr/expressions.swift b/test/expr/expressions.swift index d99a4d7c69b9c..695d2038bbdcf 100644 --- a/test/expr/expressions.swift +++ b/test/expr/expressions.swift @@ -909,7 +909,7 @@ do { x = (x,(3,y)).1.1 } -// SR-3439 subscript with pound exprssions. +// SR-3439 subscript with pound expressions. Sr3439: do { class B { init() {} From c2f294178228f226578cca6677583b72d016b4ab Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:30:38 -0400 Subject: [PATCH 15/44] spelling: flaky Signed-off-by: Josh Soref --- test/ModuleInterface/ossa-modules/sdk-test-stdlib-ossa.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ModuleInterface/ossa-modules/sdk-test-stdlib-ossa.swift b/test/ModuleInterface/ossa-modules/sdk-test-stdlib-ossa.swift index 588c64edbc456..41d380d50ee01 100644 --- a/test/ModuleInterface/ossa-modules/sdk-test-stdlib-ossa.swift +++ b/test/ModuleInterface/ossa-modules/sdk-test-stdlib-ossa.swift @@ -25,7 +25,7 @@ // RUN: %target-swift-frontend -typecheck -sdk '%t/SDK' -prebuilt-module-cache-path '%t/PreBuiltSDKModules' -module-cache-path %t/TempModuleCacheOther -resource-dir '' -parse-stdlib -Rmodule-interface-rebuild %S/Inputs/sdk-test-stdlib-no-ossa-referent-no-rebuild-remark.swift -verify -enable-ossa-modules -// Flacky hangs: rdar://77288690 +// Flaky hangs: rdar://77288690 // UNSUPPORTED: CPU=arm64, CPU=arm64e @_fixed_layout From 6eb838332ed0296b7f54f0f73721e9a9235e6e38 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:30:47 -0400 Subject: [PATCH 16/44] spelling: forward Signed-off-by: Josh Soref --- .../explicit-module-map-forwarding-module.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ScanDependencies/explicit-module-map-forwarding-module.swift b/test/ScanDependencies/explicit-module-map-forwarding-module.swift index 1a27d0ac4e951..a0b596052c047 100644 --- a/test/ScanDependencies/explicit-module-map-forwarding-module.swift +++ b/test/ScanDependencies/explicit-module-map-forwarding-module.swift @@ -10,7 +10,7 @@ // Step 2: build .swiftmodule from .swiftinterface and give the adjacent .swiftmodule as a candidate compiled module. // RUN: %target-swift-frontend -compile-module-from-interface %t/inputs/Foo.swiftinterface -o %t/inputs/Foo-from-interface.swiftmodule -module-name Foo -candidate-module-file %t/inputs/Foo.swiftmodule -// Step 3: the new .swiftmodule should be a fowarding module. +// Step 3: the new .swiftmodule should be a forwarding module. // RUN: %{python} %S/../ModuleInterface/ModuleCache/Inputs/check-is-forwarding-module.py %t/inputs/Foo-from-interface.swiftmodule // Step 4: using the forwarding module in explicit module map should be OK. From b047b6158d26e1c8724c0842ab89577553fa30d0 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:31:00 -0400 Subject: [PATCH 17/44] spelling: function Signed-off-by: Josh Soref --- test/Profiler/converage_result_builder.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Profiler/converage_result_builder.swift b/test/Profiler/converage_result_builder.swift index be6874f87f641..e7c6364914432 100644 --- a/test/Profiler/converage_result_builder.swift +++ b/test/Profiler/converage_result_builder.swift @@ -1,4 +1,4 @@ -// RUN: %target-swift-frontend -Xllvm -sil-full-demangle -profile-generate -profile-coverage-mapping -emit-sorted-sil -emit-sil -module-name coverage_functon_builder %s | %FileCheck %s +// RUN: %target-swift-frontend -Xllvm -sil-full-demangle -profile-generate -profile-coverage-mapping -emit-sorted-sil -emit-sil -module-name coverage_function_builder %s | %FileCheck %s // RUN: %target-swift-frontend -profile-generate -profile-coverage-mapping -emit-ir %s @resultBuilder @@ -11,7 +11,7 @@ struct Summer { } } -// CHECK-LABEL: sil_coverage_map {{.*}} "$s24coverage_functon_builder5test0SiyF" +// CHECK-LABEL: sil_coverage_map {{.*}} "$s24coverage_function_builder5test0SiyF" @Summer func test0() -> Int { // CHECK: [[@LINE-1]]:21 -> [[@LINE+3]]:2 : 0 @@ -19,7 +19,7 @@ func test0() -> Int { 12 } -// CHECK-LABEL: sil_coverage_map {{.*}} "$s24coverage_functon_builder5test1SiyF" +// CHECK-LABEL: sil_coverage_map {{.*}} "$s24coverage_function_builder5test1SiyF" @Summer func test1() -> Int { // CHECK: [[@LINE-1]]:21 -> [[@LINE+7]]:2 : 0 From 6a962042cf3e70f3265d595ff280280832dcbf8b Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:31:58 -0400 Subject: [PATCH 18/44] spelling: have Signed-off-by: Josh Soref --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 04436afe5809f..fcec3283322b5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -240,7 +240,7 @@ foreach(SDK ${SWIFT_SDKS}) foreach(ARCH ${SWIFT_SDK_${SDK}_ARCHITECTURES}) # macCatalyst needs to run two sets of tests: one with the normal macosx target triple # and one with the the macCatalyst ios-macabi triple. The build_flavors list will - # have have only the "default" flavor for all SDKs and architectures except + # have only the "default" flavor for all SDKs and architectures except # OSX when macCatalyst support is enabled. get_swift_test_build_flavors(build_flavors "${SDK}") From 51891545343de7ba29e9fd1b370349adf0168141 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:32:53 -0400 Subject: [PATCH 19/44] spelling: important Signed-off-by: Josh Soref --- lib/Demangling/NodePrinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Demangling/NodePrinter.cpp b/lib/Demangling/NodePrinter.cpp index 61967d96066ab..8bad1a4459a0a 100644 --- a/lib/Demangling/NodePrinter.cpp +++ b/lib/Demangling/NodePrinter.cpp @@ -2551,7 +2551,7 @@ NodePointer NodePrinter::print(NodePointer Node, unsigned depth, if (index != 0) Printer << ", "; // Limit the number of printed generic parameters. In practice this - // it will never be exceeded. The limit is only imporant for malformed + // it will never be exceeded. The limit is only important for malformed // symbols where count can be really huge. if (index >= 128) { Printer << "..."; From 48103e09397baaf56f28531bebdc4ec6dc7fa3cc Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:32:56 -0400 Subject: [PATCH 20/44] spelling: imported Signed-off-by: Josh Soref --- test/SourceKit/CodeComplete/complete_cache.swift | 4 ++-- .../complete_import_module_flag.swift | 4 ++-- .../complete_moduleimportdepth.swift | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/SourceKit/CodeComplete/complete_cache.swift b/test/SourceKit/CodeComplete/complete_cache.swift index 8601fbb90ac79..25601667585c7 100644 --- a/test/SourceKit/CodeComplete/complete_cache.swift +++ b/test/SourceKit/CodeComplete/complete_cache.swift @@ -30,7 +30,7 @@ func test2() { // VOID_1-NEXT: key.description: // VOID_1-NEXT: key.typename: "Never", // VOID_1-NEXT: key.context: source.codecompletion.context.othermodule, -// VOID_1-NEXT: key.moduleimportdepth: 1, +// VOID_1-NEXT: key.moduleimportedepth: 1, // VOID_1-NEXT: key.num_bytes_to_erase: 0, // VOID_1-NEXT: key.substructure: @@ -39,7 +39,7 @@ func test2() { // VOID_1-NEXT: key.description: // VOID_1-NEXT: key.typename: "Int32", // VOID_1-NEXT: key.context: source.codecompletion.context.othermodule, -// VOID_1-NEXT: key.moduleimportdepth: 2, +// VOID_1-NEXT: key.moduleimportedepth: 2, // VOID_1-NEXT: key.num_bytes_to_erase: 0, // VOID_1-NEXT: key.substructure: diff --git a/test/SourceKit/CodeComplete/complete_import_module_flag.swift b/test/SourceKit/CodeComplete/complete_import_module_flag.swift index 1ca1329a9bc70..62ed7eaaece39 100644 --- a/test/SourceKit/CodeComplete/complete_import_module_flag.swift +++ b/test/SourceKit/CodeComplete/complete_import_module_flag.swift @@ -12,7 +12,7 @@ func test() { // CHECK-LABEL: key.name: "fromAuxFile() // CHECK-NOT: context // CHECK: key.context: source.codecompletion.context.othermodule -// CHECK-NEXT: key.moduleimportdepth: 0 +// CHECK-NEXT: key.moduleimportedepth: 0 // CHECK-LABEL: key.name: "fromMainModule() // CHECK-NOT: context @@ -21,7 +21,7 @@ func test() { // CHECK-LABEL: key.name: "fromImportedByAuxFile() // CHECK-NOT: context // CHECK: key.context: source.codecompletion.context.othermodule -// CHECK-NEXT: key.moduleimportdepth: 1 +// CHECK-NEXT: key.moduleimportedepth: 1 // WITH_HIDING: fromAuxFile() // WITH_HIDING: fromMainModule() diff --git a/test/SourceKit/CodeComplete/complete_moduleimportdepth.swift b/test/SourceKit/CodeComplete/complete_moduleimportdepth.swift index cbb6e11821ebe..baae34f0855da 100644 --- a/test/SourceKit/CodeComplete/complete_moduleimportdepth.swift +++ b/test/SourceKit/CodeComplete/complete_moduleimportdepth.swift @@ -16,7 +16,7 @@ func test() { // CHECK-NEXT: key.typename: "Comparable & SignedNumeric", // CHECK-NEXT: key.doc.brief: "Returns the absolute value of the given number.", // CHECK-NEXT: key.context: source.codecompletion.context.othermodule, -// CHECK-NEXT: key.moduleimportdepth: 1, +// CHECK-NEXT: key.moduleimportedepth: 1, // CHECK-NEXT: key.num_bytes_to_erase: 0, // CHECK-NOT: key.modulename // CHECK: key.modulename: "Swift" @@ -28,7 +28,7 @@ func test() { // CHECK-NEXT: key.description: "fooHelperExplicitFrameworkFunc1(a: Int32)", // CHECK-NEXT: key.typename: "Int32", // CHECK-NEXT: key.context: source.codecompletion.context.othermodule, -// CHECK-NEXT: key.moduleimportdepth: 1, +// CHECK-NEXT: key.moduleimportedepth: 1, // CHECK-NEXT: key.num_bytes_to_erase: 0, // CHECK-NOT: key.modulename // CHECK: key.modulename: "FooHelper.FooHelperExplicit" @@ -40,7 +40,7 @@ func test() { // CHECK-NEXT: key.description: "importsImportsFoo()", // CHECK-NEXT: key.typename: "Void", // CHECK-NEXT: key.context: source.codecompletion.context.othermodule, -// CHECK-NEXT: key.moduleimportdepth: 1, +// CHECK-NEXT: key.moduleimportedepth: 1, // CHECK-NEXT: key.num_bytes_to_erase: 0, // CHECK-NOT: key.modulename // CHECK: key.modulename: "ImportsImportsFoo" @@ -52,7 +52,7 @@ func test() { // CHECK-NEXT: key.description: "BarForwardDeclaredClass", // CHECK-NEXT: key.typename: "BarForwardDeclaredClass", // CHECK-NEXT: key.context: source.codecompletion.context.othermodule, -// CHECK-NEXT: key.moduleimportdepth: 2, +// CHECK-NEXT: key.moduleimportedepth: 2, // CHECK-NEXT: key.num_bytes_to_erase: 0, // CHECK-NOT: key.modulename // CHECK: key.modulename: "Bar" @@ -64,7 +64,7 @@ func test() { // CHECK-NEXT: key.description: "importsFoo()", // CHECK-NEXT: key.typename: "Void", // CHECK-NEXT: key.context: source.codecompletion.context.othermodule, -// CHECK-NEXT: key.moduleimportdepth: 2, +// CHECK-NEXT: key.moduleimportedepth: 2, // CHECK-NEXT: key.num_bytes_to_erase: 0, // CHECK-NOT: key.modulename // CHECK: key.modulename: "ImportsFoo" @@ -76,7 +76,7 @@ func test() { // CHECK-NEXT: key.description: "FooClassBase", // CHECK-NEXT: key.typename: "FooClassBase", // CHECK-NEXT: key.context: source.codecompletion.context.othermodule, -// CHECK-NEXT: key.moduleimportdepth: 3, +// CHECK-NEXT: key.moduleimportedepth: 3, // CHECK-NEXT: key.num_bytes_to_erase: 0, // CHECK-NOT: key.modulename // CHECK: key.modulename: "Foo" @@ -87,7 +87,7 @@ func test() { // CHECK-NEXT: key.description: "FooSubEnum1", // CHECK-NEXT: key.typename: "FooSubEnum1", // CHECK-NEXT: key.context: source.codecompletion.context.othermodule, -// CHECK-NEXT: key.moduleimportdepth: 3, +// CHECK-NEXT: key.moduleimportedepth: 3, // CHECK-NEXT: key.num_bytes_to_erase: 0, // CHECK-NOT: key.modulename // CHECK: key.modulename: "Foo.FooSub" @@ -101,7 +101,7 @@ func test() { // xCHECK-NEXT: key.description: "FooHelperUnnamedEnumeratorA2", // xCHECK-NEXT: key.typename: "Int", // xCHECK-NEXT: key.context: source.codecompletion.context.othermodule, -// xCHECK-NEXT: key.moduleimportdepth: 4, +// xCHECK-NEXT: key.moduleimportedepth: 4, // xCHECK-NEXT: key.num_bytes_to_erase: 0, // xCHECK-NOT: key.modulename // xCHECK: key.modulename: "FooHelper" From 2fe8cde009ed9e6d36b5de1686691bdd0aee15ff Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:33:09 -0400 Subject: [PATCH 21/44] spelling: inconsistent Signed-off-by: Josh Soref --- test/type/opaque.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/type/opaque.swift b/test/type/opaque.swift index 0a4ae53d2e5be..b07882b922bd0 100644 --- a/test/type/opaque.swift +++ b/test/type/opaque.swift @@ -274,7 +274,7 @@ func associatedTypeIdentity() { sameType(gary(candace()).r_out(), gary(candace()).r_out()) sameType(gary(doug()).r_out(), gary(doug()).r_out()) // TODO(diagnostics): This is not great but the problem comes from the way solver discovers and attempts bindings, if we could detect that - // `(some R).S` from first reference to `gary()` in incosistent with the second one based on the parent type of `S` it would be much easier to diagnose. + // `(some R).S` from first reference to `gary()` in inconsistent with the second one based on the parent type of `S` it would be much easier to diagnose. sameType(gary(doug()).r_out(), gary(candace()).r_out()) // expected-error@-1:12 {{conflicting arguments to generic parameter 'T' ('some R' (result type of 'doug') vs. 'some R' (result type of 'candace'))}} // expected-error@-2:34 {{conflicting arguments to generic parameter 'T' ('some R' (result type of 'doug') vs. 'some R' (result type of 'candace'))}} From 1865d65cb21fe17fd5a060ca2f745a3bd4726441 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:35:50 -0400 Subject: [PATCH 22/44] spelling: interpret Signed-off-by: Josh Soref --- test/Misc/serialized-diagnostics-interpret-mode.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Misc/serialized-diagnostics-interpret-mode.swift b/test/Misc/serialized-diagnostics-interpret-mode.swift index 0e8e054df0048..3aba8482c994f 100644 --- a/test/Misc/serialized-diagnostics-interpret-mode.swift +++ b/test/Misc/serialized-diagnostics-interpret-mode.swift @@ -4,11 +4,11 @@ // RUN: %target-swift-frontend -typecheck -serialize-diagnostics-path %t.dia %s -verify // RUN: %target-swift-frontend -typecheck -serialize-diagnostics-path=%t_EQ.dia %s -verify -// RUN: not %swift_driver -serialize-diagnostics-path %t_intepret_mode.dia %s -// RUN: not %swift_driver -serialize-diagnostics-path=%t_EQ_intepret_mode.dia %s +// RUN: not %swift_driver -serialize-diagnostics-path %t_interpret_mode.dia %s +// RUN: not %swift_driver -serialize-diagnostics-path=%t_EQ_interpret_mode.dia %s // RUN: diff %t.dia %t_EQ.dia -// RUN: diff %t.dia %t_intepret_mode.dia -// RUN: diff %t.dia %t_EQ_intepret_mode.dia +// RUN: diff %t.dia %t_interpret_mode.dia +// RUN: diff %t.dia %t_EQ_interpret_mode.dia var x = 1 x = 2 // expected-error {{consecutive statements on a line must be separated by ';'}} {{10-10=;}} From 7cd866876b7718fa994764b5005cc3d65c440fc5 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:36:31 -0400 Subject: [PATCH 23/44] spelling: kyrtzidis Signed-off-by: Josh Soref --- CODE_OWNERS.TXT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODE_OWNERS.TXT b/CODE_OWNERS.TXT index 8973e32c41780..9b8565470bd5c 100644 --- a/CODE_OWNERS.TXT +++ b/CODE_OWNERS.TXT @@ -37,7 +37,7 @@ E: jgroff@apple.com G: jckarter D: SIL, SILGen, everything in Swift not covered by someone else -N: Argyrios Kyrzidis +N: Argyrios Kyrtzidis E: kyrtzidis@apple.com G: akyrtzi D: IDE, Index, SourceKit, swift-ide-test From c5f50a2067b87c3944ad639f35dadf49a6fe5b9b Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:37:04 -0400 Subject: [PATCH 24/44] spelling: lousy Signed-off-by: Josh Soref --- test/expr/closure/trailing.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/expr/closure/trailing.swift b/test/expr/closure/trailing.swift index 083538d9f3f9f..bee6896ff7339 100644 --- a/test/expr/closure/trailing.swift +++ b/test/expr/closure/trailing.swift @@ -133,7 +133,7 @@ let someInt = 0 let intArray = [someInt] limitXY(someInt, toGamut: intArray) {} // expected-error{{extra trailing closure passed in call}} -// QoI: Invalid trailing closures in stmt-conditions produce lowsy diagnostics +// QoI: Invalid trailing closures in stmt-conditions produce lousy diagnostics func retBool(x: () -> Int) -> Bool {} func maybeInt(_: () -> Int) -> Int? {} func twoClosureArgs(_:()->Void, _:()->Void) -> Bool {} From d8fe11d33efc83005f3bac437caf970cff1eac5b Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Mon, 18 Apr 2022 22:16:35 -0400 Subject: [PATCH 25/44] spelling: nonexistent Signed-off-by: Josh Soref --- .../Localization/no_localization_files_and_wrong_path.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/diagnostics/Localization/no_localization_files_and_wrong_path.swift b/test/diagnostics/Localization/no_localization_files_and_wrong_path.swift index 83a66139a2722..b17b8523a7ee6 100644 --- a/test/diagnostics/Localization/no_localization_files_and_wrong_path.swift +++ b/test/diagnostics/Localization/no_localization_files_and_wrong_path.swift @@ -1,7 +1,7 @@ -// RUN: %target-typecheck-verify-swift -localization-path /Not_exsisting_path -locale en +// RUN: %target-typecheck-verify-swift -localization-path /Nonexistent_path -locale en -// :0: warning: cannot find translations for 'en' at '/Not_exsisting_path/en.yaml': no such file -// :0: warning: specified localization directory '/Not_exsisting_path' does not exist, translation is disabled +// :0: warning: cannot find translations for 'en' at '/Nonexistent_path/en.yaml': no such file +// :0: warning: specified localization directory '/Nonexistent_path' does not exist, translation is disabled _ = "HI! // expected-error@-1{{unterminated string literal}} From cbbf38a4d5f2a4be160e6a527e17909793b349a1 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 1 May 2022 00:18:07 -0400 Subject: [PATCH 26/44] spelling: offset Signed-off-by: Josh Soref --- include/swift/Reflection/TypeRefBuilder.h | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/include/swift/Reflection/TypeRefBuilder.h b/include/swift/Reflection/TypeRefBuilder.h index d0edd6fed7c8b..5b9d2a875674e 100644 --- a/include/swift/Reflection/TypeRefBuilder.h +++ b/include/swift/Reflection/TypeRefBuilder.h @@ -1033,13 +1033,13 @@ class TypeRefBuilder { auto parentOffsetAddress = detail::applyRelativeOffset( (const char *)contextDescriptorAddress, (int32_t)contextDescriptor->getParentOffset()); - auto parentOfsetBytes = OpaqueByteReader( + auto parentOffsetBytes = OpaqueByteReader( remote::RemoteAddress(parentOffsetAddress), sizeof(uint32_t)); - if (!parentOfsetBytes.get()) { + if (!parentOffsetBytes.get()) { Error = "Failed to parent offset in a type descriptor."; return llvm::None; } - auto parentFieldOffset = (const int32_t *)parentOfsetBytes.get(); + auto parentFieldOffset = (const int32_t *)parentOffsetBytes.get(); auto parentTargetAddress = detail::applyRelativeOffset( (const char *)parentOffsetAddress, *parentFieldOffset); @@ -1128,13 +1128,13 @@ class TypeRefBuilder { auto typeNameOffsetAddress = detail::applyRelativeOffset((const char *)typeDescriptorAddress, (int32_t)typeDescriptor->getNameOffset()); - auto typeNameOfsetBytes = OpaqueByteReader( + auto typeNameOffsetBytes = OpaqueByteReader( remote::RemoteAddress(typeNameOffsetAddress), sizeof(uint32_t)); - if (!typeNameOfsetBytes.get()) { + if (!typeNameOffsetBytes.get()) { Error = "Failed to read type name offset in a type descriptor."; return llvm::None; } - auto typeNameOffset = (const uint32_t *)typeNameOfsetBytes.get(); + auto typeNameOffset = (const uint32_t *)typeNameOffsetBytes.get(); auto typeNameAddress = detail::applyRelativeOffset( (const char *)typeNameOffsetAddress, (int32_t)*typeNameOffset); std::string typeName; @@ -1149,15 +1149,15 @@ class TypeRefBuilder { auto parentNameOffsetAddress = detail::applyRelativeOffset( (const char *)moduleDescriptorAddress, (int32_t)moduleDescriptor->getNameOffset()); - auto parentNameOfsetBytes = OpaqueByteReader( + auto parentNameOffsetBytes = OpaqueByteReader( remote::RemoteAddress(parentNameOffsetAddress), sizeof(uint32_t)); - if (!parentNameOfsetBytes.get()) { + if (!parentNameOffsetBytes.get()) { Error = "Failed to read parent name offset in a module descriptor."; return llvm::None; } - auto parentNameOfset = (const uint32_t *)parentNameOfsetBytes.get(); + auto parentNameOffset = (const uint32_t *)parentNameOffsetBytes.get(); auto parentNameAddress = detail::applyRelativeOffset( - (const char *)parentNameOffsetAddress, (int32_t)*parentNameOfset); + (const char *)parentNameOffsetAddress, (int32_t)*parentNameOffset); std::string parentName; OpaqueStringReader(remote::RemoteAddress(parentNameAddress), parentName); return parentName; @@ -1183,13 +1183,13 @@ class TypeRefBuilder { auto protocolNameOffsetAddress = detail::applyRelativeOffset( (const char *)protocolDescriptorAddress, (int32_t)protocolDescriptor->getNameOffset()); - auto protocolNameOfsetBytes = OpaqueByteReader( + auto protocolNameOffsetBytes = OpaqueByteReader( remote::RemoteAddress(protocolNameOffsetAddress), sizeof(uint32_t)); - if (!protocolNameOfsetBytes.get()) { + if (!protocolNameOffsetBytes.get()) { Error = "Failed to read type name offset in a protocol descriptor."; return llvm::None; } - auto protocolNameOffset = (const uint32_t *)protocolNameOfsetBytes.get(); + auto protocolNameOffset = (const uint32_t *)protocolNameOffsetBytes.get(); // Using the offset above, compute the address of the name field itsel // and read it. From 7f6cce880321248bcb76c266b2cdf5e299a611f4 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:41:00 -0400 Subject: [PATCH 27/44] spelling: overload Signed-off-by: Josh Soref --- test/Compatibility/tuple_arguments_4.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Compatibility/tuple_arguments_4.swift b/test/Compatibility/tuple_arguments_4.swift index 7b7fb995b3672..6dddcf4cb5310 100644 --- a/test/Compatibility/tuple_arguments_4.swift +++ b/test/Compatibility/tuple_arguments_4.swift @@ -2,7 +2,7 @@ // https://bugs.swift.org/browse/SR-6837 -// FIXME: Can't overlaod local functions so these must be top-level +// FIXME: Can't overload local functions so these must be top-level func takePairOverload(_ pair: (Int, Int?)) {} func takePairOverload(_: () -> ()) {} From 8ea2944d55bc1c1ff1e583cad4d53302917f14f0 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 1 May 2022 00:01:37 -0400 Subject: [PATCH 28/44] spelling: overridden Signed-off-by: Josh Soref --- lib/Migrator/APIDiffMigratorPass.cpp | 2 +- test/Inputs/polymorphic_builtins.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Migrator/APIDiffMigratorPass.cpp b/lib/Migrator/APIDiffMigratorPass.cpp index d41acb9c8e093..cbe5ad90e7800 100644 --- a/lib/Migrator/APIDiffMigratorPass.cpp +++ b/lib/Migrator/APIDiffMigratorPass.cpp @@ -1432,7 +1432,7 @@ struct APIDiffMigratorPass : public ASTMigratorPass, public SourceEntityWalker { if (auto *VD = dyn_cast(D)) { for (auto *Item: getRelatedDiffItems(VD)) { if (auto *CD = dyn_cast(Item)) { - // If the overriden property has been renamed, we should rename + // If the overridden property has been renamed, we should rename // this property decl as well. if (CD->isRename() && VD->getNameLoc().isValid()) { Editor.replaceToken(VD->getNameLoc(), CD->getNewName()); diff --git a/test/Inputs/polymorphic_builtins.swift b/test/Inputs/polymorphic_builtins.swift index 9bebf112f89fc..1c871295d00dc 100644 --- a/test/Inputs/polymorphic_builtins.swift +++ b/test/Inputs/polymorphic_builtins.swift @@ -55,7 +55,7 @@ extension SIMDStorage { @inline(never) get { // Will never be called unless `_hasVectorRepresentation == true`, - // in which case this implementation would be overriden in stdlib + // in which case this implementation would be overridden in stdlib fatalError(""" Error! Called default SIMDStorage._vector impl?! A SIMDStorage class overrides _hasVectorRepresentation to return true, but did not provide @@ -83,7 +83,7 @@ extension SIMDStorage { @inline(never) public init(_storage: _InnerStorage) { // Will never be called unless `_hasVectorRepresentation == true`, in - // which case this implementation would be overriden in stdlib + // which case this implementation would be overridden in stdlib fatalError(""" Error! Called default SIMDStorage.init(_vector) impl?! A SIMDStorage class overrides _hasVectorRepresentation to return true, but did not provide an From f4e1797989bdd2194e5c03053c2810f04f92816b Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:41:21 -0400 Subject: [PATCH 29/44] spelling: parameter Signed-off-by: Josh Soref --- include/swift/Demangling/Demangler.h | 2 +- lib/Migrator/APIDiffMigratorPass.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/swift/Demangling/Demangler.h b/include/swift/Demangling/Demangler.h index 5a66eb2d27ca2..97e94ea8afe7d 100644 --- a/include/swift/Demangling/Demangler.h +++ b/include/swift/Demangling/Demangler.h @@ -623,7 +623,7 @@ class Demangler : public NodeFactory { /// A demangler which uses stack space for its initial memory. /// -/// The \p Size paramter specifies the size of the stack space. +/// The \p Size parameter specifies the size of the stack space. template class StackAllocatedDemangler : public Demangler { char StackSpace[Size]; diff --git a/lib/Migrator/APIDiffMigratorPass.cpp b/lib/Migrator/APIDiffMigratorPass.cpp index cbe5ad90e7800..440b9b307fe73 100644 --- a/lib/Migrator/APIDiffMigratorPass.cpp +++ b/lib/Migrator/APIDiffMigratorPass.cpp @@ -1300,7 +1300,7 @@ struct APIDiffMigratorPass : public ASTMigratorPass, public SourceEntityWalker { if (Params.size() <= Idx) return; - // Get the internal name of the changed paramter. + // Get the internal name of the changed parameter. auto VariableName = Params[Idx]->getParameterName().str(); // Insert the helper function to convert the type back to raw types. From 903a1d99425a83137888da4cdb588440c11d44ec Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:42:25 -0400 Subject: [PATCH 30/44] spelling: platforms Signed-off-by: Josh Soref --- test/lit.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lit.cfg b/test/lit.cfg index d79bef2d8f725..35e8625dd7215 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -2528,7 +2528,7 @@ if copy_env is not None: config.environment[key] = os.environ[key] # On macOS reflection information is read through the dyld APIs -# On other platorms, this information is exported through extra +# On other platforms, this information is exported through extra # entry points in the Swift runtime that are only available in debug builds. # Windows currently does not support basic reflection support. if 'objc_interop' in config.available_features or ('swift_stdlib_asserts' in config.available_features and not kIsWindows): From d39e869271cd71c0fa90a5054acee7b35934b33c Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:45:13 -0400 Subject: [PATCH 31/44] spelling: refers Signed-off-by: Josh Soref --- test/expr/closure/closures.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/expr/closure/closures.swift b/test/expr/closure/closures.swift index d0245883e4f4b..fd308afc8cc57 100644 --- a/test/expr/closure/closures.swift +++ b/test/expr/closure/closures.swift @@ -553,7 +553,7 @@ class SR3186 { } } -// Apply the explicit 'self' rule even if it referrs to a capture, if +// Apply the explicit 'self' rule even if it refers to a capture, if // we're inside a nested closure class SR14120 { func operation() {} From b8b45b673226611691be688b1ebc73e535701d43 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:45:29 -0400 Subject: [PATCH 32/44] spelling: relative Signed-off-by: Josh Soref --- test/swift-indent/basic.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/swift-indent/basic.swift b/test/swift-indent/basic.swift index 89c3bdf7c1eb4..29434054fcbd2 100644 --- a/test/swift-indent/basic.swift +++ b/test/swift-indent/basic.swift @@ -225,7 +225,7 @@ func foo( } -// Sequence expressions should indent realtive to their first element. Leading +// Sequence expressions should indent relative to their first element. Leading // "=" should be considered part of the sequence when present. // let arrayA = [0] From c1092c7f913d07528a59690b0963427113477d8e Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:46:13 -0400 Subject: [PATCH 33/44] spelling: requirement Signed-off-by: Josh Soref --- .../Relationships/DefaultImplementationOf/Indirect.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/SymbolGraph/Relationships/DefaultImplementationOf/Indirect.swift b/test/SymbolGraph/Relationships/DefaultImplementationOf/Indirect.swift index ba0c118192841..193dece347078 100644 --- a/test/SymbolGraph/Relationships/DefaultImplementationOf/Indirect.swift +++ b/test/SymbolGraph/Relationships/DefaultImplementationOf/Indirect.swift @@ -15,5 +15,5 @@ extension Q { // CHECK-DAG: "kind": "defaultImplementationOf",{{[[:space:]]*}}"source": "s:8Indirect1QPAAE3fooyyF",{{[[:space:]]*}}"target": "s:8Indirect1PP3fooyyF" -// Since foo is a default implementation of a requirment, we don't consider this to be a "member" +// Since foo is a default implementation of a requirement, we don't consider this to be a "member" // CHECK-NOT: memberOf From 1244ba673f0119728ad67765c5b99367cec01fe7 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:46:39 -0400 Subject: [PATCH 34/44] spelling: respective Signed-off-by: Josh Soref --- test/ScanDependencies/module_deps.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ScanDependencies/module_deps.swift b/test/ScanDependencies/module_deps.swift index acff92f6f3501..780874969b45d 100644 --- a/test/ScanDependencies/module_deps.swift +++ b/test/ScanDependencies/module_deps.swift @@ -24,7 +24,7 @@ // RUN: %target-swift-frontend -scan-dependencies -test-dependency-scan-cache-serialization -module-cache-path %t/clang-module-cache %s -o %t/deps.json -I %S/Inputs/CHeaders -I %S/Inputs/Swift -import-objc-header %S/Inputs/CHeaders/Bridging.h -swift-version 4 // RUN: %FileCheck -check-prefix CHECK_NO_CLANG_TARGET %s < %t/deps.json -// Ensure that scanning with `-clang-target` makes sure that Swift modules' respecitve PCM-dependency-build-argument sets do not contain target triples. +// Ensure that scanning with `-clang-target` makes sure that Swift modules' respective PCM-dependency-build-argument sets do not contain target triples. // RUN: %target-swift-frontend -scan-dependencies -module-cache-path %t/clang-module-cache %s -o %t/deps_clang_target.json -I %S/Inputs/CHeaders -I %S/Inputs/Swift -import-objc-header %S/Inputs/CHeaders/Bridging.h -swift-version 4 -clang-target %target-cpu-apple-macosx10.14 // Check the contents of the JSON output // RUN: %FileCheck -check-prefix CHECK_CLANG_TARGET %s < %t/deps_clang_target.json From b9c5def9e0e549a6cfd7ec8fc0c7deb4aa3cca3e Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:46:52 -0400 Subject: [PATCH 35/44] spelling: resurrect Signed-off-by: Josh Soref --- test/Prototypes/DoubleWidth.swift.gyb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Prototypes/DoubleWidth.swift.gyb b/test/Prototypes/DoubleWidth.swift.gyb index 8cea6af64f055..c696f491f1181 100644 --- a/test/Prototypes/DoubleWidth.swift.gyb +++ b/test/Prototypes/DoubleWidth.swift.gyb @@ -6,7 +6,7 @@ import StdlibUnittest // XXX: Auxiliary tests & benchmark for DoubleWidth were removed in PR #23024. // When the DoubleWidth makes comeback, revert the commits from there to -// ressurect what was just a dead code in the meantime… +// resurrect what was just a dead code in the meantime… /// A fixed-width integer that has twice the bit width of its base type. /// From 3fd637ea6fd88a9d8e456274e756fd5bd969f31c Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:47:45 -0400 Subject: [PATCH 36/44] spelling: satisfied Signed-off-by: Josh Soref --- test/Runtime/demangleToMetadata.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Runtime/demangleToMetadata.swift b/test/Runtime/demangleToMetadata.swift index 8d09124462340..5143f9a330c7b 100644 --- a/test/Runtime/demangleToMetadata.swift +++ b/test/Runtime/demangleToMetadata.swift @@ -430,7 +430,7 @@ DemangleToMetadataTests.test("Nested types in extensions") { .InnermostUConformsToP3.self, _typeByName("4main4SG11VA2A2P1RzlE016InnerTConformsToC0VA2A2P3Rd__rlE018InnermostUConformsfG0VyAA08ConformsfC0V_AA0jf5P2AndG0V_AA0jF3P4aVG")!) - // Failure case: Dictionary's outer `Key: Hashable` constraint not sastified + // Failure case: Dictionary's outer `Key: Hashable` constraint not satisfied expectNil(_typeByName("s10DictionaryV4mainE5InnerVyAC12ConformsToP1VSi_AC12ConformsToP1VG")) // Failure case: Dictionary's inner `V: P1` constraint not satisfied expectNil(_typeByName("s10DictionaryV4mainE5InnerVySSSi_AC12ConformsToP2VG")) From b69d4d4643099b9728e6fcfe33f30ce6d4d95613 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:48:30 -0400 Subject: [PATCH 37/44] spelling: should Signed-off-by: Josh Soref --- test/expr/closure/closures.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/expr/closure/closures.swift b/test/expr/closure/closures.swift index fd308afc8cc57..457f78c65b313 100644 --- a/test/expr/closure/closures.swift +++ b/test/expr/closure/closures.swift @@ -210,7 +210,7 @@ class ExplicitSelfRequiredTest { doStuff {method() } // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note{{capture 'self' explicitly to enable implicit 'self' in this closure}} {{14-14= [self] in }} expected-note{{reference 'self.' explicitly}} {{14-14=self.}} doVoidStuff {_ = method() } // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note{{capture 'self' explicitly to enable implicit 'self' in this closure}} {{18-18= [self] in }} expected-note{{reference 'self.' explicitly}} {{22-22=self.}} doVoidStuff {() -> () in _ = method() } // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note{{capture 'self' explicitly to enable implicit 'self' in this closure}} {{18-18= [self]}} expected-note{{reference 'self.' explicitly}} {{34-34=self.}} - // With an empty capture list, insertion should should be suggested without a comma + // With an empty capture list, insertion should be suggested without a comma doStuff { [] in method() } // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note{{capture 'self' explicitly to enable implicit 'self' in this closure}} {{16-16=self}} expected-note{{reference 'self.' explicitly}} {{21-21=self.}} doStuff { [ ] in method() } // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note{{capture 'self' explicitly to enable implicit 'self' in this closure}} {{16-16=self}} expected-note{{reference 'self.' explicitly}} {{23-23=self.}} doStuff { [ /* This space intentionally left blank. */ ] in method() } // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note{{capture 'self' explicitly to enable implicit 'self' in this closure}} {{16-16=self}} expected-note{{reference 'self.' explicitly}} {{65-65=self.}} From 4de4ea8f14fded4b6f1387ffcf94bbc581699884 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:50:05 -0400 Subject: [PATCH 38/44] spelling: statement Signed-off-by: Josh Soref --- test/type/opaque_return_structural.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/type/opaque_return_structural.swift b/test/type/opaque_return_structural.swift index d1267b85f8b0f..4674c7e180ec6 100644 --- a/test/type/opaque_return_structural.swift +++ b/test/type/opaque_return_structural.swift @@ -66,7 +66,7 @@ func funcToAnyOpaqueCoercion() -> S1 { } // TODO: We should give better error messages here. The opaque types have -// underlying types 'Int' and 'String', but the return statments have underlying +// underlying types 'Int' and 'String', but the return statements have underlying // types '(Int, Int)' and '(String, Int)'. func structuralMismatchedReturnTypes(_ x: Bool, _ y: Int, _ z: String) -> (some P, Int) { // expected-error{{do not have matching underlying types}} if x { From 0a2444d7aaee8967cdf3a9c437a168b15d4799ae Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:51:26 -0400 Subject: [PATCH 39/44] spelling: syntax Signed-off-by: Josh Soref --- include/swift/Syntax/Syntax.h | 2 +- lib/Syntax/SyntaxSerialization.cpp.gyb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/swift/Syntax/Syntax.h b/include/swift/Syntax/Syntax.h index e7e3146edb127..a751f6561e06a 100644 --- a/include/swift/Syntax/Syntax.h +++ b/include/swift/Syntax/Syntax.h @@ -141,7 +141,7 @@ class OwnedSyntaxRef { /// Same as \c OwnedSyntaxRef but can be null. We don't use \c /// Optional>>, because then we couldn't access -/// the underlying \c SytnaxRefType via the \c -> operator (the use of \c -> +/// the underlying \c SyntaxRefType via the \c -> operator (the use of \c -> /// would access the \c OwnedSyntaxRef wrapped by \c Optional and /// not the \c SyntaxRefType wrapped by \c OwnedSyntaxRef. template diff --git a/lib/Syntax/SyntaxSerialization.cpp.gyb b/lib/Syntax/SyntaxSerialization.cpp.gyb index 78cb0c49725ac..7ba412399fa72 100644 --- a/lib/Syntax/SyntaxSerialization.cpp.gyb +++ b/lib/Syntax/SyntaxSerialization.cpp.gyb @@ -8,7 +8,7 @@ }% //// Automatically Generated From SyntaxSerialization.cpp.gyb. //// Do Not Edit Directly! -//===---------------------- SytnaxSerialization.cpp -----------------------===// +//===---------------------- SyntaxSerialization.cpp -----------------------===// // // This source file is part of the Swift.org open source project // From 25b60507990ed74ee169b5a4370e6eeba76e7f89 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:51:43 -0400 Subject: [PATCH 40/44] spelling: that Signed-off-by: Josh Soref --- include/swift/ABI/TaskOptions.h | 2 +- include/swift/Concurrency/Actor.h | 2 +- .../NameLookup/Inputs/lazy_function_body_expansion_helper.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/swift/ABI/TaskOptions.h b/include/swift/ABI/TaskOptions.h index 950fdeb554b50..b2ccb73770d11 100644 --- a/include/swift/ABI/TaskOptions.h +++ b/include/swift/ABI/TaskOptions.h @@ -78,7 +78,7 @@ class TaskGroupTaskOptionRecord : public TaskOptionRecord { /// Task option to specify on what executor the task should be executed. /// -/// Not passing this option implies that that a "best guess" or good default +/// Not passing this option implies that a "best guess" or good default /// executor should be used instead, most often this may mean the global /// concurrent executor, or the enclosing actor's executor. class ExecutorTaskOptionRecord : public TaskOptionRecord { diff --git a/include/swift/Concurrency/Actor.h b/include/swift/Concurrency/Actor.h index 3bec6a2ab884a..ff2863a372664 100644 --- a/include/swift/Concurrency/Actor.h +++ b/include/swift/Concurrency/Actor.h @@ -39,7 +39,7 @@ enum : uint32_t { // It is possible for an actor to be in Running and yet completely released // by clients. However, the actor needs to be kept alive until it is done // executing the task that is running on it and gives it up. It is only - // after that that we can safely deallocate it. + // after that we can safely deallocate it. ActorStateMask = 0x7, /// The actor is not currently scheduled. Completely redundant diff --git a/test/NameLookup/Inputs/lazy_function_body_expansion_helper.swift b/test/NameLookup/Inputs/lazy_function_body_expansion_helper.swift index 7e949be39d4bc..b5cb99b082b5f 100644 --- a/test/NameLookup/Inputs/lazy_function_body_expansion_helper.swift +++ b/test/NameLookup/Inputs/lazy_function_body_expansion_helper.swift @@ -1,5 +1,5 @@ // Body of closure in parameter to call of closureTaker is created lazily -// and this test ensures that that body scope does get expanded +// and this test ensures that body scope does get expanded var v = closureTaker { func amIFound() {} } From c409270d7eb462da37ad00c33577d3da263c11f1 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 17:20:41 -0400 Subject: [PATCH 41/44] spelling: the Signed-off-by: Josh Soref --- include/swift/ABI/Metadata.h | 2 +- test/CMakeLists.txt | 4 ++-- .../ModuleCache/SDKDependencies-disable-validation.swift | 2 +- test/ModuleInterface/ModuleCache/SDKDependencies.swift | 2 +- test/TBD/specialization.swift | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/swift/ABI/Metadata.h b/include/swift/ABI/Metadata.h index 17173cdc57c1e..22b4eba508583 100644 --- a/include/swift/ABI/Metadata.h +++ b/include/swift/ABI/Metadata.h @@ -877,7 +877,7 @@ struct TargetClassMetadata : public TargetAnyClassMetadataVariant { // // Using Objective-C runtime, KVO can modify object behavior without needing // to modify the object's code. This is done by dynamically creating an - // artificial subclass of the the object's type. + // artificial subclass of the object's type. // // The isa pointer of the observed object is swapped out to point to // the artificial subclass, which has the following properties: diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fcec3283322b5..5b218e2f5b1fd 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -239,7 +239,7 @@ endif() foreach(SDK ${SWIFT_SDKS}) foreach(ARCH ${SWIFT_SDK_${SDK}_ARCHITECTURES}) # macCatalyst needs to run two sets of tests: one with the normal macosx target triple - # and one with the the macCatalyst ios-macabi triple. The build_flavors list will + # and one with the macCatalyst ios-macabi triple. The build_flavors list will # have only the "default" flavor for all SDKs and architectures except # OSX when macCatalyst support is enabled. get_swift_test_build_flavors(build_flavors "${SDK}") @@ -296,7 +296,7 @@ foreach(SDK ${SWIFT_SDKS}) "swift-test-stdlib-${SWIFT_SDK_${SDK}_LIB_SUBDIR}") if(BUILD_FLAVOR STREQUAL "ios-like") - # When testing the iOS-like build flavor, use the the normal macOS + # When testing the iOS-like build flavor, use the normal macOS # swift-reflection-test-tool. That tool runs out of process so it # doesn't need to be build for macCatalyst. list(APPEND test_dependencies diff --git a/test/ModuleInterface/ModuleCache/SDKDependencies-disable-validation.swift b/test/ModuleInterface/ModuleCache/SDKDependencies-disable-validation.swift index 80da766c02a0e..fb3ff42ae9486 100644 --- a/test/ModuleInterface/ModuleCache/SDKDependencies-disable-validation.swift +++ b/test/ModuleInterface/ModuleCache/SDKDependencies-disable-validation.swift @@ -62,7 +62,7 @@ // RUN: echo '2: PASSED' -// 3) Baseline check: Make sure we use the the prebuilt module cache when using the SDK it was built with +// 3) Baseline check: Make sure we use the prebuilt module cache when using the SDK it was built with // // RUN: %target-swift-frontend -typecheck -I %t/my-sdk -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies -disable-modules-validate-system-headers %s // diff --git a/test/ModuleInterface/ModuleCache/SDKDependencies.swift b/test/ModuleInterface/ModuleCache/SDKDependencies.swift index 5460621f1cee7..8c4d9f32bf10d 100644 --- a/test/ModuleInterface/ModuleCache/SDKDependencies.swift +++ b/test/ModuleInterface/ModuleCache/SDKDependencies.swift @@ -72,7 +72,7 @@ // RUN: echo '2: PASSED' -// 3) Baseline check: Make sure we use the the prebuilt module cache when using the SDK it was built with +// 3) Baseline check: Make sure we use the prebuilt module cache when using the SDK it was built with // // RUN: %target-swift-frontend -typecheck -I %t/my-sdk -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies -emit-loaded-module-trace-path %t/trace.json %s // diff --git a/test/TBD/specialization.swift b/test/TBD/specialization.swift index 6a9571b50719f..289d9859a695f 100644 --- a/test/TBD/specialization.swift +++ b/test/TBD/specialization.swift @@ -1,5 +1,5 @@ // REQUIRES: VENDOR=apple -// Validate the the specializations actually exist (if they don't then we're not +// Validate the specializations actually exist (if they don't then we're not // validating that they end up with the correct linkages): // RUN: %target-swift-frontend -emit-sil -o- -O -Xllvm -sil-disable-pass=cmo -validate-tbd-against-ir=none %s | %FileCheck %s From f9c12b77c7afdbe579295734b9db9c93ac02d81d Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:54:38 -0400 Subject: [PATCH 42/44] spelling: unpredictable Signed-off-by: Josh Soref --- test/Sanitizers/asan/recover.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Sanitizers/asan/recover.swift b/test/Sanitizers/asan/recover.swift index ee879e0f7dee5..5a557ebb4f961 100644 --- a/test/Sanitizers/asan/recover.swift +++ b/test/Sanitizers/asan/recover.swift @@ -52,7 +52,7 @@ func foo(_ rawptr:UnsafeMutablePointer) { // test this because there's no undefined behavior happening. Hopefully this // means that the program behaviour after ASan catches an issue should be // consistent. If we did something different like two use-after-free issues the -// behaviour could be very unpredicatable resulting in a flakey test. +// behaviour could be very unpredictable resulting in a flakey test. var x = UnsafeMutablePointer.allocate(capacity: size) x.initialize(repeating: 0, count: size) __asan_poison_memory_region(UnsafeMutableRawPointer(x), size) From 3520df8789f0f9473fa736cc61e18c7d999a1b73 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:55:39 -0400 Subject: [PATCH 43/44] spelling: visited Signed-off-by: Josh Soref --- lib/TBDGen/TBDGen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/TBDGen/TBDGen.cpp b/lib/TBDGen/TBDGen.cpp index 6ed3a8f29316b..bb926a1951ac2 100644 --- a/lib/TBDGen/TBDGen.cpp +++ b/lib/TBDGen/TBDGen.cpp @@ -269,7 +269,7 @@ getLinkerPlatformName(OriginallyDefinedInAttr::ActiveVersion Ver) { return getLinkerPlatformName((uint8_t)getLinkerPlatformId(Ver)); } -/// Find the most relevant introducing version of the decl stack we have visted +/// Find the most relevant introducing version of the decl stack we have visited /// so far. static Optional getInnermostIntroVersion(ArrayRef DeclStack, PlatformKind Platform) { From c86aa555f4573c9c32d535cc5cacc390c7f4fc7e Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 20:28:05 -0400 Subject: [PATCH 44/44] spelling: would Signed-off-by: Josh Soref --- lib/Migrator/Diff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Migrator/Diff.h b/lib/Migrator/Diff.h index ef933b04d999a..1b102e6fd515b 100644 --- a/lib/Migrator/Diff.h +++ b/lib/Migrator/Diff.h @@ -662,7 +662,7 @@ class diff_match_patch { static string_t diff_linesToCharsMunge(const string_t &text, std::map &lineHash) { string_t chars; // Walk the text, pulling out a substring for each line. - // text.split('\n') would would temporarily double our memory footprint. + // text.split('\n') would temporarily double our memory footprint. // Modifying text would create many large strings to garbage collect. typename string_t::size_type lineLen; for (typename string_t::const_pointer lineStart = text.c_str(), textEnd = lineStart + text.size(); lineStart < textEnd; lineStart += lineLen + 1) {