Skip to content

Commit d352652

Browse files
Merge pull request #7727 from practicalswift/typos-20170223
[gardening] Fix typos
2 parents 82073f9 + 33a5601 commit d352652

File tree

19 files changed

+27
-29
lines changed

19 files changed

+27
-29
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ function(_add_variant_c_compile_flags)
228228
endif()
229229
endif()
230230

231-
# MSVC/clang-cl don't support -fno-pic or -fms-compatability-version.
231+
# MSVC/clang-cl don't support -fno-pic or -fms-compatibility-version.
232232
if(NOT SWIFT_COMPILER_IS_MSVC_LIKE)
233233
list(APPEND result -fno-pic)
234234
list(APPEND result "-fms-compatibility-version=1900")

docs/OwnershipManifesto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ iteration variable `inout`:
11241124
```
11251125

11261126
The sequence operand must be a storage reference expression.
1127-
The storage will be accessed for the duraton of the loop,
1127+
The storage will be accessed for the duration of the loop,
11281128
which (as above) will prevent any other overlapping accesses
11291129
to the collection. (But this rule does not apply if the
11301130
collection type defines the operation as a non-mutating

docs/SIL.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3867,7 +3867,7 @@ container referenced by ``%0``. The protocol conformances associated
38673867
with this existential container are associated directly with the
38683868
archetype ``$*@opened P``. This pointer can be used with any operation
38693869
on archetypes, such as ``witness_method`` assuming this operation obeys the
3870-
access contraint: The returned address can either allow ``mutable_access`` or
3870+
access constraint: The returned address can either allow ``mutable_access`` or
38713871
``immutable_access``. Users of the returned address may only consume
38723872
(e.g ``destroy_addr`` or ``copy_addr [take]``) or mutate the value at the
38733873
address if they have ``mutable_access``.

include/swift/AST/GenericSignatureBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class RequirementSource : public llvm::FoldingSetNode {
138138

139139
/// The actual storage, described by \c storageKind.
140140
union {
141-
/// The type representation descibing where the requirement came from.
141+
/// The type representation describing where the requirement came from.
142142
const TypeRepr *typeRepr;
143143

144144
/// Where a requirement came from.

include/swift/IDE/Utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ class DeclNameViewer {
307307
unsigned commonPartsCount(DeclNameViewer &Other) const;
308308
};
309309

310-
/// This provide a utility for writing to a underlying string buffer mulitiple
310+
/// This provide a utility for writing to a underlying string buffer multiple
311311
/// string pieces and retrieve them later when the underlying buffer is stable.
312312
class DelayedStringRetriever : public raw_ostream {
313313
SmallVectorImpl<char> &OS;

include/swift/Parse/Lexer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class Lexer {
233233
lexImpl();
234234
}
235235

236-
/// Lex a full token includig leading and trailing trivia.
236+
/// Lex a full token including leading and trailing trivia.
237237
syntax::RC<syntax::TokenSyntax> fullLex();
238238

239239
bool isKeepingComments() const {

include/swift/Syntax/DeclSyntax.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,14 @@ class StructDeclSyntax final : public DeclSyntax {
221221
withGenericParameterClause(GenericParameterClauseSyntax NewGenericParams)
222222
const;
223223

224-
/// Return the where clayse of the struct declaration.
224+
/// Return the where clause of the struct declaration.
225225
GenericWhereClauseSyntax getGenericWhereClause() const;
226226

227227
/// Return a StructDeclSyntax with the given generic where clause.
228228
StructDeclSyntax
229229
withWhereClause(GenericWhereClauseSyntax NewWhereClause) const;
230230

231-
/// Return the left brace '{' token of the struct declartion.
231+
/// Return the left brace '{' token of the struct declaration.
232232
RC<TokenSyntax> getLeftBraceToken() const;
233233

234234
/// Return a StructDeclSyntax with the given left brace '{' token.
@@ -240,7 +240,7 @@ class StructDeclSyntax final : public DeclSyntax {
240240
/// Return a StructDeclSyntax with the given new members.
241241
StructDeclSyntax withMembers(DeclMembersSyntax NewMembers) const;
242242

243-
/// Return the right brace '}' token of the struct declartion.
243+
/// Return the right brace '}' token of the struct declaration.
244244
RC<TokenSyntax> getRightBraceToken() const;
245245

246246
/// Return a StructDeclSyntax with the given right brace '}' token.

include/swift/Syntax/References.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ template <typename Inner>
2424
using RC = llvm::IntrusiveRefCntPtr<Inner>;
2525

2626
} // end namespace syntax
27-
} // end namespae swift
27+
} // end namespace swift
2828

2929
#endif // SWIFT_SYNTAX_REFERENCES_H

include/swift/Syntax/StmtSyntax.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class FallthroughStmtSyntax : public StmtSyntax {
267267
/// fallthrough statement.
268268
RC<TokenSyntax> getFallthroughKeyword() const;
269269

270-
/// Return a new FallthroughtStmtSyntax with the given fallthrough
270+
/// Return a new FallthroughStmtSyntax with the given fallthrough
271271
/// keyword.
272272
FallthroughStmtSyntax
273273
withFallthroughKeyword(RC<TokenSyntax> NewFallthroughKeyword) const;

include/swift/Syntax/Trivia.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ enum class TriviaKind {
122122
Backtick,
123123
};
124124

125-
/// A contiguous stretch of a single kind of trivia. The constiuent part of
125+
/// A contiguous stretch of a single kind of trivia. The constituent part of
126126
/// a `Trivia` collection.
127127
///
128128
/// For example, four spaces would be represented by

include/swift/Syntax/TypeSyntax.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ class OptionalTypeSyntax final : public TypeSyntax {
662662
};
663663

664664
#pragma mark -
665-
#pragma mark implicity-unwrapped-optional-type Data
665+
#pragma mark implicitly-unwrapped-optional-type Data
666666

667667
class ImplicitlyUnwrappedOptionalTypeSyntaxData final : public TypeSyntaxData {
668668
friend struct SyntaxFactory;
@@ -683,7 +683,7 @@ class ImplicitlyUnwrappedOptionalTypeSyntaxData final : public TypeSyntaxData {
683683
};
684684

685685
#pragma mark -
686-
#pragma mark implicity-unwrapped-optional-type API
686+
#pragma mark implicitly-unwrapped-optional-type API
687687

688688
/// implicitly-unwrapped-optional-type -> type '!'
689689
class ImplicitlyUnwrappedOptionalTypeSyntax final : public TypeSyntax {
@@ -729,8 +729,6 @@ class ArrayTypeSyntaxData final : public TypeSyntaxData {
729729
friend class SyntaxData;
730730
friend struct SyntaxFactory;
731731

732-
RC<TypeSyntaxData> CachedElemenType;
733-
734732
ArrayTypeSyntaxData(RC<RawSyntax> Raw,
735733
const SyntaxData *Parent = nullptr,
736734
CursorIndex IndexInParent = 0);

lib/AST/GenericSignatureBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ struct GenericSignatureBuilder::ResolvedType {
574574
// FIXME: this probably shouldn't exist, the potential archetype modelling of
575575
// generic typealiases is fundamentally broken (aka they're not modelled at
576576
// all), but some things with them mostly work, so we just maintain that,
577-
// despite this causing crashes and weird behaviour.
577+
// despite this causing crashes and weird behavior.
578578
static ResolvedType forConcreteTypeFromGenericTypeAlias(Type t) {
579579
return ResolvedType(t);
580580
}

lib/IRGen/GenCall.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ namespace {
251251

252252
bool claimError() {
253253
auto Ret = CanUseError;
254-
assert(CanUseError && "Mulitple error parameters?!");
254+
assert(CanUseError && "Multiple error parameters?!");
255255
CanUseError = false;
256256
return Ret;
257257
}
@@ -2450,7 +2450,7 @@ Explosion NativeConventionSchema::mapFromNative(IRGenModule &IGM,
24502450
? coercionTy
24512451
: overlappedCoercionTy;
24522452

2453-
// Allocate a temporary for the coersion.
2453+
// Allocate a temporary for the coercion.
24542454
Address temporary;
24552455
Size tempSize;
24562456
std::tie(temporary, tempSize) = allocateForCoercion(
@@ -2580,7 +2580,7 @@ Explosion NativeConventionSchema::mapIntoNative(IRGenModule &IGM,
25802580
? coercionTy
25812581
: overlappedCoercionTy;
25822582

2583-
// Allocate a temporary for the coersion.
2583+
// Allocate a temporary for the coercion.
25842584
Address temporary;
25852585
Size tempSize;
25862586
std::tie(temporary, tempSize) = allocateForCoercion(
@@ -2647,7 +2647,7 @@ void IRGenFunction::emitScalarReturn(SILType resultType, Explosion &result,
26472647
return;
26482648
}
26492649

2650-
// In the native case no coersion is needed.
2650+
// In the native case no coercion is needed.
26512651
if (isSwiftCCReturn) {
26522652
auto &nativeSchema =
26532653
IGM.getTypeInfo(resultType).nativeReturnValueSchema(IGM);

lib/SILOptimizer/Mandatory/AddressLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ void OpaqueStorageAllocation::replaceFunctionArgs() {
330330
///
331331
/// TODO: It might be faster to generate args directly from
332332
/// SILFunctionConventions without drilling through the result SILType. But one
333-
/// way or annother, we need to map result types into this context.
333+
/// way or another, we need to map result types into this context.
334334
unsigned
335335
OpaqueStorageAllocation::insertIndirectResultParameters(unsigned argIdx,
336336
SILType resultType) {

lib/SILOptimizer/Transforms/PerformanceInliner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static bool calleeHasPartialApplyWithOpenedExistentials(FullApplySite AI) {
179179
SILFunction *Callee = AI.getReferencedFunction();
180180
auto Subs = AI.getSubstitutions();
181181

182-
// Bail if there are no open existnetials in the list of substitutions.
182+
// Bail if there are no open existentials in the list of substitutions.
183183
bool HasNoOpenedExistentials = true;
184184
for (auto Sub : Subs) {
185185
if (Sub.getReplacement()->hasOpenedExistential()) {
@@ -303,7 +303,7 @@ SILFunction *SILPerformanceInliner::getEligibleFunction(FullApplySite AI) {
303303
return nullptr;
304304
}
305305

306-
// IRGen cannot handle partial_applies containing opened_extistentials
306+
// IRGen cannot handle partial_applies containing opened_existentials
307307
// in its substitutions list.
308308
if (calleeHasPartialApplyWithOpenedExistentials(AI)) {
309309
return nullptr;

lib/Syntax/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ points for this library:
7171
1. Represent Swift grammar and use naming conventions in accordance with The
7272
Swift Programming Language book as much as possible, so people know what to
7373
look for.
74-
1. Accomodate "bad syntax" - humans are imperfect and source code is constantly
74+
1. Accommodate "bad syntax" - humans are imperfect and source code is constantly
7575
in a state of flux in an editor. Unforunately, we still live in a
7676
character-centric world - the library shouldn't fall over on bad syntax just
7777
because someone is in the middle of typing `struct`.

lib/Syntax/SyntaxFactory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- SyntaxBulider.cpp - Swift Syntax Builder Implementation *- C++ -*-===//
1+
//===--- SyntaxFactory.cpp - Swift Syntax Builder Implementation *- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

lib/Syntax/TypeSyntax.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ OptionalTypeSyntax::withQuestionToken(RC<TokenSyntax> NewQuestionToken) const {
650650
return Data->replaceSelf<OptionalTypeSyntax>(NewRaw);
651651
}
652652

653-
#pragma mark - implicity-unwrapped-optional-type Data
653+
#pragma mark - implicitly-unwrapped-optional-type Data
654654

655655
ImplicitlyUnwrappedOptionalTypeSyntaxData::
656656
ImplicitlyUnwrappedOptionalTypeSyntaxData(RC<RawSyntax> Raw,
@@ -685,7 +685,7 @@ ImplicitlyUnwrappedOptionalTypeSyntaxData::makeBlank() {
685685
SourcePresence::Present));
686686
}
687687

688-
#pragma mark - implicity-unwrapped-optional-type API
688+
#pragma mark - implicitly-unwrapped-optional-type API
689689

690690
ImplicitlyUnwrappedOptionalTypeSyntax::
691691
ImplicitlyUnwrappedOptionalTypeSyntax(RC<SyntaxData> Root,

test/Generics/protocol_type_aliases.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func requirementOnConcreteNestedTypeAlias<T>(_: T) where T: Q2, T.C == T.B.X {}
5151
func concreteRequirementOnConcreteNestedTypeAlias<T>(_: T) where T: Q2, S<T.C> == T.B.X {}
5252

5353

54-
// Incompatable concrete typealias types are flagged as such
54+
// Incompatible concrete typealias types are flagged as such
5555
protocol P3 {
5656
typealias T = Int // expected-error{{typealias 'T' requires types 'Int' and 'Float' to be the same}}
5757
}

0 commit comments

Comments
 (0)