Skip to content

Commit dc62dd9

Browse files
authored
Merge pull request #68249 from mdb1/manu/fix-typos
Fix some typos in the codebase
2 parents bc6795c + 02b5fa2 commit dc62dd9

File tree

21 files changed

+25
-25
lines changed

21 files changed

+25
-25
lines changed

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Code of Conduct
22

3-
The code of conduct for this project can be found at https://swift.org/code-of-conduct.
3+
The code of conduct for this project can be found at https://swift.org/code-of-conduct/.
44

55
<!-- Copyright (c) 2021 Apple Inc and the Swift Project authors. All Rights Reserved. -->

SwiftCompilerSources/Sources/Optimizer/FunctionPasses/ComputeSideEffects.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ let computeSideEffects = FunctionPass(name: "compute-side-effects") {
5656
// global effects to the argument, because we don't know to which "global" side-effect
5757
// instruction the argument might have escaped.
5858
for argument in function.arguments {
59-
collectedEffects.addEffectsForEcapingArgument(argument: argument)
59+
collectedEffects.addEffectsForEscapingArgument(argument: argument)
6060
}
6161

6262
// Don't modify the effects if they didn't change. This avoids sending a change notification
@@ -214,7 +214,7 @@ private struct CollectedEffects {
214214
}
215215
}
216216

217-
mutating func addEffectsForEcapingArgument(argument: FunctionArgument) {
217+
mutating func addEffectsForEscapingArgument(argument: FunctionArgument) {
218218
var escapeWalker = ArgumentEscapingWalker()
219219

220220
if escapeWalker.hasUnknownUses(argument: argument) {

SwiftCompilerSources/Sources/Optimizer/ModulePasses/MandatoryPerformanceOptimizations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private func inlineAndDevirtualize(apply: FullApplySite, alreadyInlinedFunctions
9595
}
9696

9797
if !context.loadFunction(function: callee, loadCalleesRecursively: true) {
98-
// We don't have the funcion body of the callee.
98+
// We don't have the function body of the callee.
9999
return
100100
}
101101

benchmark/single-source/AngryPhonebook.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public func run_AngryPhonebook(_ n: Int) {
9191
// To keep the performance of various scripts roughly comparable, aim for
9292
// a total length of approximately 120 characters.
9393
// E.g.: `ascii.joined(separator: "").count == 124`
94-
// Every name should fit in 15-bytes UTF-8 encoded, to excercise the small
94+
// Every name should fit in 15-bytes UTF-8 encoded, to exercise the small
9595
// string optimization.
9696
// E.g.: `armenian.allSatisfy { $0._guts.isSmall } == true`
9797

docs/CppInteroperability/UserGuide-CallingSwiftFromC++.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ enum value will abort the program.
593593
### Resilient Enums
594594

595595
A resilient Swift enumeration value could represent a case that's unknown to the client.
596-
Swift forces the client to check if the value is `@uknown default` when switching over
596+
Swift forces the client to check if the value is `@unknown default` when switching over
597597
the enumeration to account for that. C++ follows a similar principle,
598598
by exposing an `unknownDefault` case that can then be matched in a switch.
599599

lib/Macros/Sources/ObservationMacros/ObservableMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ extension ObservableMacro: MemberAttributeMacro {
243243
return []
244244
}
245245

246-
// dont apply to ignored properties or properties that are already flaged as tracked
246+
// dont apply to ignored properties or properties that are already flagged as tracked
247247
if property.hasMacroApplication(ObservableMacro.ignoredMacroName) ||
248248
property.hasMacroApplication(ObservableMacro.trackedMacroName) {
249249
return []

lib/Refactoring/Refactoring.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ bool RefactoringActionExtractFunction::performChange() {
14031403
// Correct the given name if collision happens.
14041404
PreferredName = correctNewDeclName(InsertToDC, PreferredName);
14051405

1406-
// Collect the paramters to pass down to the new function.
1406+
// Collect the parameters to pass down to the new function.
14071407
std::vector<ReferencedDecl> Parameters;
14081408
for (auto &RD: RangeInfo.ReferencedDecls) {
14091409
// If the referenced decl is declared elsewhere, no need to pass as parameter

lib/SILGen/SILGenApply.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3381,7 +3381,7 @@ class ArgEmitter {
33813381
loweredSubstParamType, origParamType, paramSlice))
33823382
return;
33833383

3384-
// If we have a guaranteed paramter, see if we have a move only type and
3384+
// If we have a guaranteed parameter, see if we have a move only type and
33853385
// can emit it borrow.
33863386
//
33873387
// We check for move only in tryEmitBorrowedMoveOnly.

lib/SILGen/SILGenProlog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ static void emitCaptureArguments(SILGenFunction &SGF,
11611161
fArg->setClosureCapture(true);
11621162
arg = SILValue(fArg);
11631163

1164-
// If we have an inout noncopyable paramter, insert a consumable and
1164+
// If we have an inout noncopyable parameter, insert a consumable and
11651165
// assignable.
11661166
//
11671167
// NOTE: If we have an escaping closure, we are going to emit an error later

lib/SILOptimizer/Mandatory/AddressLowering.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ namespace swift {
117117
/// %d_0 -def-> ... -def-> %d_N -use-> %u_0 -use-> ... -use-> %u_M
118118
///
119119
/// a sequence (possibly empty) of def projections followed by a sequence
120-
/// (possibly emtpy) of use projections [projection_chain_structure].
120+
/// (possibly empty) of use projections [projection_chain_structure].
121121
struct ValueStorage {
122122
enum : uint32_t { InvalidID = uint32_t(~0) };
123123
enum : uint16_t { InvalidOper = uint16_t(~0) };

0 commit comments

Comments
 (0)