diff --git a/CMakeLists.txt b/CMakeLists.txt index f063b94572e23..440cf49101bda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -936,7 +936,7 @@ if("${SWIFT_NATIVE_SWIFT_TOOLS_PATH}" STREQUAL "") set(SWIFT_NATIVE_SWIFT_TOOLS_PATH "${SWIFT_RUNTIME_OUTPUT_INTDIR}") set(SWIFT_EXEC_FOR_SWIFT_MODULES "${CMAKE_Swift_COMPILER}") if(NOT SWIFT_EXEC_FOR_SWIFT_MODULES) - message(WARNING "BOOSTRAPPING set to OFF because no Swift compiler is defined") + message(WARNING "BOOTSTRAPPING set to OFF because no Swift compiler is defined") set(BOOTSTRAPPING_MODE "OFF") endif() elseif(BOOTSTRAPPING_MODE MATCHES "BOOTSTRAPPING.*") diff --git a/cmake/modules/SwiftConfigureSDK.cmake b/cmake/modules/SwiftConfigureSDK.cmake index 8a0fc2a21b294..44bb39b4f2669 100644 --- a/cmake/modules/SwiftConfigureSDK.cmake +++ b/cmake/modules/SwiftConfigureSDK.cmake @@ -323,7 +323,7 @@ macro(configure_sdk_unix name architectures) endif() set(SWIFT_SDK_${prefix}_USE_ISYSROOT FALSE) - # Static linking is suported on Linux and WASI + # Static linking is supported on Linux and WASI if("${prefix}" STREQUAL "LINUX" OR "${prefix}" STREQUAL "LINUX_STATIC" OR "${prefix}" STREQUAL "WASI") diff --git a/tools/SourceKit/lib/SwiftLang/SwiftASTManager.cpp b/tools/SourceKit/lib/SwiftLang/SwiftASTManager.cpp index 652011f5dcea8..f3a90a6b3d436 100644 --- a/tools/SourceKit/lib/SwiftLang/SwiftASTManager.cpp +++ b/tools/SourceKit/lib/SwiftLang/SwiftASTManager.cpp @@ -315,7 +315,7 @@ class ASTBuildOperation const std::vector FileContents; /// Guards \c DependencyStamps. This prevents reading from \c DependencyStamps - /// while it is being modified. It does not provide any ordering gurantees + /// while it is being modified. It does not provide any ordering guarantees /// that \c DependencyStamps have been computed in \c buildASTUnit before they /// are accessed in \c matchesSourceState but that's fine (see comment on /// \c DependencyStamps). diff --git a/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp b/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp index 07ad1a8f8abcc..f072e444cc8b5 100644 --- a/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp +++ b/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp @@ -208,7 +208,7 @@ namespace { /// A simple FileSystemProvider that creates an InMemoryFileSystem for a given /// dictionary of file contents and overlays that on top of the real filesystem. class InMemoryFileSystemProvider: public SourceKit::FileSystemProvider { - /// Provides the real filesystem, overlayed with an InMemoryFileSystem that + /// Provides the real filesystem, overlaid with an InMemoryFileSystem that /// contains specified files at specified locations. llvm::IntrusiveRefCntPtr getFileSystem(OptionsDictionary &options, std::string &error) override { diff --git a/tools/SourceKit/lib/SwiftLang/SwiftSourceDocInfo.cpp b/tools/SourceKit/lib/SwiftLang/SwiftSourceDocInfo.cpp index cc11e3b15e124..ed1b496258ccf 100644 --- a/tools/SourceKit/lib/SwiftLang/SwiftSourceDocInfo.cpp +++ b/tools/SourceKit/lib/SwiftLang/SwiftSourceDocInfo.cpp @@ -2099,7 +2099,7 @@ void SwiftLangSupport::getCursorInfo( } else { std::string Diagnostic; // Unused. ResolvedValueRefCursorInfoPtr Info = new ResolvedValueRefCursorInfo( - /*SourcFile=*/nullptr, SourceLoc(), + /*SourceFile=*/nullptr, SourceLoc(), const_cast(Entity.Dcl), /*CtorTyRef=*/nullptr, /*ExtTyRef=*/nullptr, Entity.IsRef, @@ -2585,7 +2585,7 @@ void SwiftLangSupport::findRelatedIdentifiersInFile( #ifndef NDEBUG for (auto loc : Locs.getLocations()) { assert(loc.OldName == OldName && - "Found related identfiers with different names?"); + "Found related identifiers with different names?"); } #endif diff --git a/tools/SourceKit/tools/sourcekitd/include/sourcekitd/Service.h b/tools/SourceKit/tools/sourcekitd/include/sourcekitd/Service.h index 0e1e155cafcb8..d99c243104135 100644 --- a/tools/SourceKit/tools/sourcekitd/include/sourcekitd/Service.h +++ b/tools/SourceKit/tools/sourcekitd/include/sourcekitd/Service.h @@ -47,7 +47,7 @@ void disposeCancellationToken(SourceKitCancellationToken CancellationToken); /// Returns \c true if \p Request is of a request kind that should be issued as /// a dispatch barrier of the message handling queue. In practice, this returns -/// \c true for open, edit and close requets. +/// \c true for open, edit and close requests. /// /// This does not check if dispatch barriers have been enabled by the sourckitd /// client. diff --git a/tools/libMockPlugin/MockPlugin.cpp b/tools/libMockPlugin/MockPlugin.cpp index 3cd3b42d64c23..834d097105759 100644 --- a/tools/libMockPlugin/MockPlugin.cpp +++ b/tools/libMockPlugin/MockPlugin.cpp @@ -113,7 +113,7 @@ static const llvm::json::Value substitute(const llvm::json::Value &value, // '.' -> object key. if (path.starts_with(".")) { if (subst->kind() != llvm::json::Value::Object) - return ""; + return ""; path = path.substr(1); auto keyLength = path.find_if([](char c) { return !llvm::isAlnum(c) && c != '_'; }); @@ -125,7 +125,7 @@ static const llvm::json::Value substitute(const llvm::json::Value &value, // '[' + ']' -> array index. if (path.starts_with("[")) { if (subst->kind() != llvm::json::Value::Array) - return ""; + return ""; path = path.substr(1); auto idxlength = path.find_if([](char c) { return !llvm::isDigit(c); }); size_t idx; @@ -133,12 +133,12 @@ static const llvm::json::Value substitute(const llvm::json::Value &value, subst = &(*subst->getAsArray())[idx]; path = path.substr(idxlength); if (!path.starts_with("]")) - return ""; + return ""; path = path.substr(1); continue; } // Malformed. - return ""; + return ""; } return *subst; } diff --git a/tools/libSwiftScan/SwiftCaching.cpp b/tools/libSwiftScan/SwiftCaching.cpp index 464c908c5e2dc..c861ea8ed1245 100644 --- a/tools/libSwiftScan/SwiftCaching.cpp +++ b/tools/libSwiftScan/SwiftCaching.cpp @@ -246,7 +246,7 @@ bool swiftscan_cas_prune_ondisk_data(swiftscan_cas_t cas, return false; } -/// Expand the invocation if there is repsonseFile into Args that are passed in +/// Expand the invocation if there is responseFile into Args that are passed in /// the parameter. Return swift-frontend arguments in an ArrayRef, which has the /// first "-frontend" option dropped if needed. static llvm::ArrayRef @@ -966,7 +966,7 @@ static llvm::Error replayCompilation(SwiftScanReplayInstance &Instance, return Proxy.takeError(); if (Kind == file_types::ID::TY_CachedDiagnostics) { - assert(!DiagnosticsOutput && "more than 1 diagnotics found"); + assert(!DiagnosticsOutput && "more than 1 diagnostics found"); DiagnosticsOutput = std::move(*Proxy); } else OutputProxies.emplace_back( diff --git a/tools/lldb-moduleimport-test/lldb-moduleimport-test.cpp b/tools/lldb-moduleimport-test/lldb-moduleimport-test.cpp index 31b5f99a87cda..e7e7f3698667b 100644 --- a/tools/lldb-moduleimport-test/lldb-moduleimport-test.cpp +++ b/tools/lldb-moduleimport-test/lldb-moduleimport-test.cpp @@ -250,7 +250,7 @@ int main(int argc, char **argv) { desc("Dump the imported module after checking it imports just fine"), cat(Visible)); - opt Verbose("verbose", desc("Dump informations on the loaded module"), + opt Verbose("verbose", desc("Dump information on the loaded module"), cat(Visible)); opt Filter("filter", desc("triple for filtering modules"), diff --git a/tools/swift-ide-test/swift-ide-test.cpp b/tools/swift-ide-test/swift-ide-test.cpp index 7f39e536af13b..a72d2f181714a 100644 --- a/tools/swift-ide-test/swift-ide-test.cpp +++ b/tools/swift-ide-test/swift-ide-test.cpp @@ -508,7 +508,7 @@ static llvm::cl::opt CodeCompletionAddCallWithNoDefaultArgs( static llvm::cl::list ConformingMethodListExpectedTypes("conforming-methods-expected-types", - llvm::cl::desc("Set expected types for comforming method list"), + llvm::cl::desc("Set expected types for conforming method list"), llvm::cl::cat(Category)); // '-syntax-coloring' options. @@ -3050,7 +3050,7 @@ static int doPrintModules(const CompilerInvocation &InitInvok, registerIDERequestFunctions(CI.getASTContext().evaluator); auto &Context = CI.getASTContext(); - // Load implict imports so that Clang importer can use it. + // Load implicit imports so that Clang importer can use it. for (auto unloadedImport : CI.getMainModule()->getImplicitImportInfo().AdditionalUnloadedImports) { (void)Context.getModule(unloadedImport.module.getModulePath()); @@ -3117,7 +3117,7 @@ static int doPrintHeaders(const CompilerInvocation &InitInvok, registerIDERequestFunctions(CI.getASTContext().evaluator); auto &Context = CI.getASTContext(); - // Load implict imports so that Clang importer can use it. + // Load implicit imports so that Clang importer can use it. for (auto unloadedImport : CI.getMainModule()->getImplicitImportInfo().AdditionalUnloadedImports) { (void)Context.getModule(unloadedImport.module.getModulePath()); diff --git a/tools/swift-inspect/Sources/swift-inspect/Operations/DumpConcurrency.swift b/tools/swift-inspect/Sources/swift-inspect/Operations/DumpConcurrency.swift index 661e9a615f673..025d77e3c56d9 100644 --- a/tools/swift-inspect/Sources/swift-inspect/Operations/DumpConcurrency.swift +++ b/tools/swift-inspect/Sources/swift-inspect/Operations/DumpConcurrency.swift @@ -313,20 +313,20 @@ fileprivate class ConcurrencyDumper { let taskToThread: [swift_addr_t: UInt64] = Dictionary(threadCurrentTasks.map{ ($1, $0) }, uniquingKeysWith: { $1 }) - var lastChilds: [Bool] = [] + var lastChildFlags: [Bool] = [] let hierarchy = taskHierarchy() for (i, (level, lastChild, task)) in hierarchy.enumerated() { - lastChilds.removeSubrange(level...) - lastChilds.append(lastChild) + lastChildFlags.removeSubrange(level...) + lastChildFlags.append(lastChild) let prevEntry = i > 0 ? hierarchy[i - 1] : nil let levelDidIncrease = level > (prevEntry?.level ?? -1) var prefix = "" - for lastChild in lastChilds { - prefix += lastChild ? " " : " | " + for lastChildFlag in lastChildFlags { + prefix += lastChildFlag ? " " : " | " } prefix += " " let firstPrefix = String(prefix.dropLast(5) + ( diff --git a/tools/swift-inspect/Sources/swift-inspect/Operations/DumpGenericMetadata.swift b/tools/swift-inspect/Sources/swift-inspect/Operations/DumpGenericMetadata.swift index ba6f115a97de4..d917b50685f26 100644 --- a/tools/swift-inspect/Sources/swift-inspect/Operations/DumpGenericMetadata.swift +++ b/tools/swift-inspect/Sources/swift-inspect/Operations/DumpGenericMetadata.swift @@ -168,7 +168,7 @@ internal struct DumpGenericMetadata: ParsableCommand { } private func dumpText(process: any RemoteProcess, generics: [Metadata]) throws { - var errorneousMetadata: [(ptr: swift_reflection_ptr_t, name: String)] = [] + var erroneousMetadata: [(ptr: swift_reflection_ptr_t, name: String)] = [] var output = try Output(genericMetadataOptions.outputFile) print("\(process.processName)(\(process.processIdentifier)):\n", to: &output) print("Address", "Allocation", "Size", "Offset", "isArrayOfClass", "Name", separator: "\t", to: &output) @@ -178,7 +178,7 @@ internal struct DumpGenericMetadata: ParsableCommand { print("\(hex: allocation.ptr)\t\(allocation.size)\t\(offset)", terminator: "\t", to: &output) } else { if $0.garbage { - errorneousMetadata.append((ptr: $0.ptr, name: $0.name)) + erroneousMetadata.append((ptr: $0.ptr, name: $0.name)) } print("???\t??\t???", terminator: "\t", to: &output) } @@ -189,9 +189,9 @@ internal struct DumpGenericMetadata: ParsableCommand { } } - if errorneousMetadata.count > 0 { + if erroneousMetadata.count > 0 { print("Warning: The following metadata was not found in any DATA or AUTH segments, may be garbage.", to: &output) - errorneousMetadata.forEach { + erroneousMetadata.forEach { print("\(hex: $0.ptr)\t\($0.name)", to: &output) } } diff --git a/unittests/AST/ImportTests.cpp b/unittests/AST/ImportTests.cpp index 096a697f36751..2cabff8e549e5 100644 --- a/unittests/AST/ImportTests.cpp +++ b/unittests/AST/ImportTests.cpp @@ -25,7 +25,7 @@ class ImportPathContext { public: ImportPathContext() = default; - /// Hepler routine for building ImportPath + /// Helper routine for building ImportPath /// Build() /// @see ImportPathBuilder inline ImportPath Build(StringRef Name) noexcept { diff --git a/utils/api_checker/dump-sdk.sh b/utils/api_checker/dump-sdk.sh index 5757eb23bdad4..8eaf8daa8ee96 100755 --- a/utils/api_checker/dump-sdk.sh +++ b/utils/api_checker/dump-sdk.sh @@ -7,7 +7,7 @@ sh "$DIR/sdk-module-lists/create-module-lists.sh" MacSDKPath=$(xcrun -sdk macosx -show-sdk-path) IphoneOSSDKPath=$(xcrun -sdk iphoneos -show-sdk-path) AppleTVOSSDKPath=$(xcrun -sdk appletvos -show-sdk-path) -WathOSSDKPath=$(xcrun -sdk watchos -show-sdk-path) +WatchOSSDKPath=$(xcrun -sdk watchos -show-sdk-path) XCTestMac="$MacSDKPath/../../Library/Frameworks/" XCTestIphone="$IphoneOSSDKPath/../../Library/Frameworks/" @@ -42,7 +42,7 @@ if [[ -z "$MODULE" ]]; then $SWIFT_API_DIGESTER -target x86_64-apple-macosx10.15 -o "$BASEDIR/macos$XCODE_VER.json" -dump-sdk -sdk "$MacSDKPath" -module-list-file "/tmp/modules-osx.txt" -F "$XCTestMac" -module-cache-path "$DumpDir/ModuleCache" -swift-version $SWIFT_VER $SWIFT_API_DIGESTER -target arm64-apple-ios13.5 -o "$BASEDIR/ios$XCODE_VER.json" -dump-sdk -sdk "$IphoneOSSDKPath" -module-list-file "/tmp/modules-iphoneos.txt" -F "$XCTestIphone" -module-cache-path "$DumpDir/ModuleCache" -swift-version $SWIFT_VER $SWIFT_API_DIGESTER -target arm64-apple-tvos13.4 -o "$BASEDIR/tvos$XCODE_VER.json" -dump-sdk -sdk "$AppleTVOSSDKPath" -module-list-file "/tmp/modules-tvos.txt" -F "$XCTestTV" -module-cache-path "$DumpDir/ModuleCache" -swift-version $SWIFT_VER - $SWIFT_API_DIGESTER -target armv7k-apple-watchos6.2 -o "$BASEDIR/watchos$XCODE_VER.json" -dump-sdk -sdk "$WathOSSDKPath" -module-list-file "/tmp/modules-watchos.txt" -module-cache-path "$DumpDir/ModuleCache" -swift-version $SWIFT_VER + $SWIFT_API_DIGESTER -target armv7k-apple-watchos6.2 -o "$BASEDIR/watchos$XCODE_VER.json" -dump-sdk -sdk "$WatchOSSDKPath" -module-list-file "/tmp/modules-watchos.txt" -module-cache-path "$DumpDir/ModuleCache" -swift-version $SWIFT_VER $SWIFT_API_DIGESTER -target x86_64-apple-macosx10.15 -o "$BASEDIR/macos-stdlib$XCODE_VER.json" -dump-sdk -sdk "$MacSDKPath" -module Swift -module-cache-path "$DumpDir/ModuleCache" -swift-version $SWIFT_VER else ALL_MODULE_DIR="$BASEDIR/Xcode$XCODE_VER" @@ -60,6 +60,6 @@ else $SWIFT_API_DIGESTER -target x86_64-apple-macosx10.15 -o "$MODULE_DIR/macos.json" -dump-sdk -sdk "$MacSDKPath" -module "$MODULE" -F "$XCTestMac" -module-cache-path "$DumpDir/ModuleCache" -swift-version $SWIFT_VER $SWIFT_API_DIGESTER -target arm64-apple-ios13.5 -o "$MODULE_DIR/ios.json" -dump-sdk -sdk "$IphoneOSSDKPath" -module "$MODULE" -F "$XCTestIphone" -module-cache-path "$DumpDir/ModuleCache" -swift-version $SWIFT_VER $SWIFT_API_DIGESTER -target arm64-apple-tvos13.4 -o "$MODULE_DIR/tvos.json" -dump-sdk -sdk "$AppleTVOSSDKPath" -module "$MODULE" -F "$XCTestTV" -module-cache-path "$DumpDir/ModuleCache" -swift-version $SWIFT_VER - $SWIFT_API_DIGESTER -target armv7k-apple-watchos6.2 -o "$MODULE_DIR/watchos.json" -dump-sdk -sdk "$WathOSSDKPath" -module "$MODULE" -module-cache-path "$DumpDir/ModuleCache" -swift-version $SWIFT_VER + $SWIFT_API_DIGESTER -target armv7k-apple-watchos6.2 -o "$MODULE_DIR/watchos.json" -dump-sdk -sdk "$WatchOSSDKPath" -module "$MODULE" -module-cache-path "$DumpDir/ModuleCache" -swift-version $SWIFT_VER done fi diff --git a/utils/build.ps1 b/utils/build.ps1 index 726a7e90c8ae7..a0d6f09b3fe63 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -1026,7 +1026,7 @@ function Build-CMakeProject { if ($Platform -eq "Windows") { $SwiftArgs += @("-Xlinker", "/INCREMENTAL:NO") - # Swift Requries COMDAT folding and de-duplication + # Swift requires COMDAT folding and de-duplication $SwiftArgs += @("-Xlinker", "/OPT:REF") $SwiftArgs += @("-Xlinker", "/OPT:ICF") } @@ -1193,7 +1193,7 @@ function Build-WiXProject() { if (-not $Bundle) { # WiX v4 will accept a semantic version string for Bundles, # but Packages still require a purely numerical version number, - # so trim any semantic versionning suffixes + # so trim any semantic versioning suffixes $ProductVersionArg = [regex]::Replace($ProductVersion, "[-+].*", "") } diff --git a/utils/gen-unicode-data/Sources/GenNormalization/Decomp.swift b/utils/gen-unicode-data/Sources/GenNormalization/Decomp.swift index 00a3961bc817f..3dbae3aecd522 100644 --- a/utils/gen-unicode-data/Sources/GenNormalization/Decomp.swift +++ b/utils/gen-unicode-data/Sources/GenNormalization/Decomp.swift @@ -34,7 +34,7 @@ func getDecompData( let decomp = components[5] // We either 1. don't have decompositions, or 2. the decompositions is for - // compatibile forms. We only care about NFD, so ignore these cases. + // compatible forms. We only care about NFD, so ignore these cases. if decomp == "" || decomp.hasPrefix("<") { continue } diff --git a/utils/gyb.py b/utils/gyb.py index 520d1dec319ac..2f55987cb8ea1 100755 --- a/utils/gyb.py +++ b/utils/gyb.py @@ -50,7 +50,7 @@ def split_lines(s): # Note: Where "# Absorb" appears below, the regexp attempts to eat up # through the end of ${...} and %{...}% constructs. In reality we -# handle this with the Python tokenizer, which avoids mis-detections +# handle this with the Python tokenizer, which avoids misdetections # due to nesting, comments and strings. This extra absorption in the # regexp facilitates testing the regexp on its own, by preventing the # interior of some of these constructs from being treated as literal diff --git a/utils/line-directive b/utils/line-directive index e55e677197343..b87f66d268d80 100755 --- a/utils/line-directive +++ b/utils/line-directive @@ -340,7 +340,7 @@ def run(): ... // Licensed under Apache License v2.0 with Runtime Library Exception ... // ... // See https://swift.org/LICENSE.txt for license information - ... // See https://swift.org/CONTRIBUTORS.txt for the list of Swift projec + ... // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project ... // ... //===----------------------------------------------------------------- ... @@ -408,7 +408,7 @@ def run(): ... return _base.underestimatedCount ... } ... - ... /// Creates an instance with elements `transform(x)` for each elemen + ... /// Creates an instance with elements `transform(x)` for each element ... /// `x` of base. ... @_inlineable ... @_versioned @@ -433,7 +433,7 @@ def run(): ... // ###sourceLocation(file: "/public/core/Map.swift.gyb", line: 108) ... ... /// A `Collection` whose elements consist of those in a `Base` - ... /// `Collection` passed through a transform function returning `Elemen + ... /// `Collection` passed through a transform function returning `Element` ... /// These elements are computed lazily, each time they're read, by ... /// calling the transform function on a base element. ... @_fixed_layout @@ -471,7 +471,7 @@ def run(): ... // ###sourceLocation(file: "/public/core/Map.swift.gyb", line: 108) ... ... /// A `Collection` whose elements consist of those in a `Base` - ... /// `Collection` passed through a transform function returning `Elemen + ... /// `Collection` passed through a transform function returning `Element` ... /// These elements are computed lazily, each time they're read, by ... /// calling the transform function on a base element. ... @_fixed_layout @@ -509,7 +509,7 @@ def run(): ... // ###sourceLocation(file: "/public/core/Map.swift.gyb", line: 108) ... ... /// A `Collection` whose elements consist of those in a `Base` - ... /// `Collection` passed through a transform function returning `Elemen + ... /// `Collection` passed through a transform function returning `Element` ... /// These elements are computed lazily, each time they're read, by ... /// calling the transform function on a base element. ... @_fixed_layout diff --git a/utils/parser-lib/profile-input.swift b/utils/parser-lib/profile-input.swift index 1a4c50a075228..d2599f796b057 100644 --- a/utils/parser-lib/profile-input.swift +++ b/utils/parser-lib/profile-input.swift @@ -294,7 +294,7 @@ class BrowserViewController: UIViewController { self.displayedPopoverController = nil } - // If we are displying a private tab, hide any elements in the tab that we wouldn't want shown + // If we are displaying a private tab, hide any elements in the tab that we wouldn't want shown // when the app is in the home switcher guard let privateTab = tabManager.selectedTab, privateTab.isPrivate else { return @@ -1104,7 +1104,7 @@ class BrowserViewController: UIViewController { postLocationChangeNotificationForTab(tab, navigation: navigation) // Fire the readability check. This is here and not in the pageShow event handler in ReaderMode.js anymore - // because that event wil not always fire due to unreliable page caching. This will either let us know that + // because that event will not always fire due to unreliable page caching. This will either let us know that // the currently loaded page can be turned into reading mode or if the page already is in reading mode. We // ignore the result because we are being called back asynchronous when the readermode status changes. webView.evaluateJavaScript("\(ReaderModeNamespace).checkReadability()", completionHandler: nil) diff --git a/utils/recursive-lipo b/utils/recursive-lipo index b62ef30428712..4841fb326a61c 100755 --- a/utils/recursive-lipo +++ b/utils/recursive-lipo @@ -128,7 +128,7 @@ def merge_lipo_files(src_root_dirs, file_list, dest_root_dir, verbose=False, "-- Warning: non-executable source files are different, " + "skipping: %s" % file_paths) else: - print("-- Warning: Unsupport file type, skipping: %s" % file_paths) + print("-- Warning: Unsupported file type, skipping: %s" % file_paths) def main(): diff --git a/utils/swift-bench.py b/utils/swift-bench.py index 6302d2252af29..dfdd21d90413f 100644 --- a/utils/swift-bench.py +++ b/utils/swift-bench.py @@ -56,7 +56,7 @@ r"\s*\(\s*\)" # argument list r"\s*->\s*Int\s*" # return type r"({)?" # opening brace of the function body - r"\s*$" # whitespace ot the end of the line + r"\s*$" # whitespace at the end of the line ) diff --git a/utils/swift_build_support/swift_build_support/products/product.py b/utils/swift_build_support/swift_build_support/products/product.py index ababc351f95ee..de813c2bcb58d 100644 --- a/utils/swift_build_support/swift_build_support/products/product.py +++ b/utils/swift_build_support/swift_build_support/products/product.py @@ -81,7 +81,7 @@ def is_ignore_install_all_product(cls): """is_ignore_install_all_product -> bool Whether this product is to ignore the install-all directive - and insted always respect its own should_install. + and instead always respect its own should_install. This is useful when we run -install-all but have products which should never be installed into the toolchain (e.g. earlyswiftdriver) @@ -296,7 +296,7 @@ def target_for_platform(self, platform, arch, include_version=True): def generate_darwin_toolchain_file(self, platform, arch): """ Generates a new CMake tolchain file that specifies Darwin as a target - plaftorm. + platform. Returns: path on the filesystem to the newly generated toolchain file. """ @@ -386,7 +386,7 @@ def get_linux_target(self, platform, arch): def generate_linux_toolchain_file(self, platform, arch): """ Generates a new CMake tolchain file that specifies Linux as a target - plaftorm. + platform. Returns: path on the filesystem to the newly generated toolchain file. """ @@ -432,7 +432,7 @@ def generate_linux_toolchain_file(self, platform, arch): def generate_toolchain_file_for_darwin_or_linux(self, host_target): """ Checks `host_target` platform and generates a new CMake tolchain file - appropriate for that target plaftorm (either Darwin or Linux). Defines + appropriate for that target platform (either Darwin or Linux). Defines `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` as CMake options. Also defines `CMAKE_TOOLCHAIN_FILE` with the path of the generated toolchain file as a CMake option. diff --git a/utils/update_checkout/update_checkout/update_checkout.py b/utils/update_checkout/update_checkout/update_checkout.py index 17dc04abdcaff..01cb9dd0e38be 100755 --- a/utils/update_checkout/update_checkout/update_checkout.py +++ b/utils/update_checkout/update_checkout/update_checkout.py @@ -544,7 +544,7 @@ def full_target_name(repository, target): def skip_list_for_platform(config, all_repos): """Computes a list of repositories to skip when updating or cloning, if not - overriden by `--all-repositories` CLI argument. + overridden by `--all-repositories` CLI argument. Args: config (Dict[str, Any]): deserialized `update-checkout-config.json` diff --git a/validation-test/SILOptimizer/constant_folded_fp_operations.swift b/validation-test/SILOptimizer/constant_folded_fp_operations.swift index 204958c707191..bfafff1671fed 100644 --- a/validation-test/SILOptimizer/constant_folded_fp_operations.swift +++ b/validation-test/SILOptimizer/constant_folded_fp_operations.swift @@ -388,7 +388,7 @@ struct FPConstantFoldedComparisonOpsValidator: FPOptimizedOpsValidator { // Equality comparisons b/w infinity and non-infinity are not constant folded. // In such comparisons, special floating point types - Float80 and Float16, may - // come into play and pattern matching againt them complicates the constant folding + // come into play and pattern matching against them complicates the constant folding // logic more than we'd like. private func checkIfEqCmpBetweenInfAndNonInf(op: FPOperation, op1: FPOperand, op2: FPOperand) -> Bool { if op == .Equal || op == .NotEqual { diff --git a/validation-test/SILOptimizer/many_trys.swift b/validation-test/SILOptimizer/many_trys.swift index ed617813a67a0..b92e686d56582 100644 --- a/validation-test/SILOptimizer/many_trys.swift +++ b/validation-test/SILOptimizer/many_trys.swift @@ -6,7 +6,7 @@ // REQUIRES: tools-release,no_asan -// For some reason this test times out sometimes when bulding for iOS: rdar://106375480 +// For some reason this test times out sometimes when building for iOS: rdar://106375480 // UNSUPPORTED: OS=ios public var gg = false diff --git a/validation-test/SILOptimizer/rle_dse_complexity.swift b/validation-test/SILOptimizer/rle_dse_complexity.swift index 8b33cd2a395e4..707a05aa17cd7 100644 --- a/validation-test/SILOptimizer/rle_dse_complexity.swift +++ b/validation-test/SILOptimizer/rle_dse_complexity.swift @@ -13,7 +13,7 @@ import Darwin // Check that redundant-load-elimination and dead-store-elimination don't take -// extermely long when optimizing statfs, which contains a 1023-element tuple. +// extremely long when optimizing statfs, which contains a 1023-element tuple. // CHECK-LABEL: test_rle_dse_compile_time public func test_rle_dse_compile_time(_ s: statfs) { diff --git a/validation-test/SILOptimizer/static_enums_fuzzing.swift b/validation-test/SILOptimizer/static_enums_fuzzing.swift index 900e2bc188de0..e198e0cdd59c7 100644 --- a/validation-test/SILOptimizer/static_enums_fuzzing.swift +++ b/validation-test/SILOptimizer/static_enums_fuzzing.swift @@ -469,7 +469,7 @@ struct Size24Enum : Value { var containsEnum: Bool { true } } -// Can't use the default random generator becaus we need deterministic results +// Can't use the default random generator because we need deterministic results struct RandomGenerator : RandomNumberGenerator { var state: (UInt64, UInt64, UInt64, UInt64) = (15042304078070129153, 10706435816813474385, 14710304063852993123, 11070704559760783939) diff --git a/validation-test/Sema/SwiftUI/issue-59716.swift b/validation-test/Sema/SwiftUI/issue-59716.swift index de77b30b4ed48..6516b49e1db75 100644 --- a/validation-test/Sema/SwiftUI/issue-59716.swift +++ b/validation-test/Sema/SwiftUI/issue-59716.swift @@ -9,8 +9,8 @@ extension TestLayout { return f() } } -struct EqualWitdthHStack : TestLayout {} -extension EqualWitdthHStack: View { +struct EqualWidthHStack : TestLayout {} +extension EqualWidthHStack: View { var body : some View { Spacer() } @@ -24,7 +24,7 @@ struct EmptyView: View { struct MyView: View { var body : some View { - EqualWitdthHStack { + EqualWidthHStack { EmptyView() } } diff --git a/validation-test/Sema/type_checker_crashers_fixed/issue-45240.swift b/validation-test/Sema/type_checker_crashers_fixed/issue-45240.swift index b5632c6fa075d..5eafd6b5e8c42 100644 --- a/validation-test/Sema/type_checker_crashers_fixed/issue-45240.swift +++ b/validation-test/Sema/type_checker_crashers_fixed/issue-45240.swift @@ -15,9 +15,9 @@ let constante : String = "Hello World" let constante2 = "Hello World" -let caractere : Character = Array(constante)[0] +let character : Character = Array(constante)[0] -let caractere2 : Character = "A" +let character2 : Character = "A" var variable : String diff --git a/validation-test/stdlib/StringBreadcrumbs.swift b/validation-test/stdlib/StringBreadcrumbs.swift index c60684ab665d1..a33e92881fa15 100644 --- a/validation-test/stdlib/StringBreadcrumbs.swift +++ b/validation-test/stdlib/StringBreadcrumbs.swift @@ -88,7 +88,7 @@ StringBreadcrumbsTests.test("largeString") { // aligning StringBreadcrumbsTests.test("surrogates-heavy") { - // Mis-align the hieroglyphics by 1,2,3 UTF-8 and UTF-16 code units + // Misalign the hieroglyphics by 1,2,3 UTF-8 and UTF-16 code units validateBreadcrumbs(nonBMP) validateBreadcrumbs("a" + nonBMP) validateBreadcrumbs("ab" + nonBMP) diff --git a/validation-test/stdlib/StringSlicesConcurrentAppend.swift b/validation-test/stdlib/StringSlicesConcurrentAppend.swift index 432910a39aefb..041e0e73eb5c6 100644 --- a/validation-test/stdlib/StringSlicesConcurrentAppend.swift +++ b/validation-test/stdlib/StringSlicesConcurrentAppend.swift @@ -23,7 +23,7 @@ extension String { } } -// Swift.String used to hsve an optimization that allowed us to append to a +// Swift.String used to have an optimization that allowed us to append to a // shared string buffer. However, as lock-free programming invariably does, it // introduced a race condition [rdar://25398370 Data Race in StringBuffer.append // (found by TSan)]. diff --git a/validation-test/stdlib/StringWordBreaking.swift b/validation-test/stdlib/StringWordBreaking.swift index 2ffbbfa0a4d85..d9e2d7bd7a671 100644 --- a/validation-test/stdlib/StringWordBreaking.swift +++ b/validation-test/stdlib/StringWordBreaking.swift @@ -87,7 +87,7 @@ if #available(SwiftStdlib 5.9, *) { // // We were accidentally hanging when rounding word indices for some concoctions of // strings. In particular, where we had a pair of scalars create a constraint -// for the preceeding pair, but the preceeding extend rules were not taking the +// for the preceding pair, but the preceding extend rules were not taking the // constraint into consideration. if #available(SwiftStdlib 5.10, *) { StringWordBreaking.test("word breaking backward extend constraints") {