Skip to content

[gardening] Fix typos #7727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function(_add_variant_c_compile_flags)
endif()
endif()

# MSVC/clang-cl don't support -fno-pic or -fms-compatability-version.
# MSVC/clang-cl don't support -fno-pic or -fms-compatibility-version.
if(NOT SWIFT_COMPILER_IS_MSVC_LIKE)
list(APPEND result -fno-pic)
list(APPEND result "-fms-compatibility-version=1900")
Expand Down
2 changes: 1 addition & 1 deletion docs/OwnershipManifesto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ iteration variable `inout`:
```

The sequence operand must be a storage reference expression.
The storage will be accessed for the duraton of the loop,
The storage will be accessed for the duration of the loop,
which (as above) will prevent any other overlapping accesses
to the collection. (But this rule does not apply if the
collection type defines the operation as a non-mutating
Expand Down
2 changes: 1 addition & 1 deletion docs/SIL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3867,7 +3867,7 @@ container referenced by ``%0``. The protocol conformances associated
with this existential container are associated directly with the
archetype ``$*@opened P``. This pointer can be used with any operation
on archetypes, such as ``witness_method`` assuming this operation obeys the
access contraint: The returned address can either allow ``mutable_access`` or
access constraint: The returned address can either allow ``mutable_access`` or
``immutable_access``. Users of the returned address may only consume
(e.g ``destroy_addr`` or ``copy_addr [take]``) or mutate the value at the
address if they have ``mutable_access``.
Expand Down
2 changes: 1 addition & 1 deletion include/swift/AST/GenericSignatureBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class RequirementSource : public llvm::FoldingSetNode {

/// The actual storage, described by \c storageKind.
union {
/// The type representation descibing where the requirement came from.
/// The type representation describing where the requirement came from.
const TypeRepr *typeRepr;

/// Where a requirement came from.
Expand Down
2 changes: 1 addition & 1 deletion include/swift/IDE/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class DeclNameViewer {
unsigned commonPartsCount(DeclNameViewer &Other) const;
};

/// This provide a utility for writing to a underlying string buffer mulitiple
/// This provide a utility for writing to a underlying string buffer multiple
/// string pieces and retrieve them later when the underlying buffer is stable.
class DelayedStringRetriever : public raw_ostream {
SmallVectorImpl<char> &OS;
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Parse/Lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class Lexer {
lexImpl();
}

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

bool isKeepingComments() const {
Expand Down
6 changes: 3 additions & 3 deletions include/swift/Syntax/DeclSyntax.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ class StructDeclSyntax final : public DeclSyntax {
withGenericParameterClause(GenericParameterClauseSyntax NewGenericParams)
const;

/// Return the where clayse of the struct declaration.
/// Return the where clause of the struct declaration.
GenericWhereClauseSyntax getGenericWhereClause() const;

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

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

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

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

/// Return a StructDeclSyntax with the given right brace '}' token.
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Syntax/References.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ template <typename Inner>
using RC = llvm::IntrusiveRefCntPtr<Inner>;

} // end namespace syntax
} // end namespae swift
} // end namespace swift

#endif // SWIFT_SYNTAX_REFERENCES_H
2 changes: 1 addition & 1 deletion include/swift/Syntax/StmtSyntax.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class FallthroughStmtSyntax : public StmtSyntax {
/// fallthrough statement.
RC<TokenSyntax> getFallthroughKeyword() const;

/// Return a new FallthroughtStmtSyntax with the given fallthrough
/// Return a new FallthroughStmtSyntax with the given fallthrough
/// keyword.
FallthroughStmtSyntax
withFallthroughKeyword(RC<TokenSyntax> NewFallthroughKeyword) const;
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Syntax/Trivia.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ enum class TriviaKind {
Semicolon
};

/// A contiguous stretch of a single kind of trivia. The constiuent part of
/// A contiguous stretch of a single kind of trivia. The constituent part of
/// a `Trivia` collection.
///
/// For example, four spaces would be represented by
Expand Down
6 changes: 2 additions & 4 deletions include/swift/Syntax/TypeSyntax.h
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ class OptionalTypeSyntax final : public TypeSyntax {
};

#pragma mark -
#pragma mark implicity-unwrapped-optional-type Data
#pragma mark implicitly-unwrapped-optional-type Data

class ImplicitlyUnwrappedOptionalTypeSyntaxData final : public TypeSyntaxData {
friend struct SyntaxFactory;
Expand All @@ -683,7 +683,7 @@ class ImplicitlyUnwrappedOptionalTypeSyntaxData final : public TypeSyntaxData {
};

#pragma mark -
#pragma mark implicity-unwrapped-optional-type API
#pragma mark implicitly-unwrapped-optional-type API

/// implicitly-unwrapped-optional-type -> type '!'
class ImplicitlyUnwrappedOptionalTypeSyntax final : public TypeSyntax {
Expand Down Expand Up @@ -729,8 +729,6 @@ class ArrayTypeSyntaxData final : public TypeSyntaxData {
friend class SyntaxData;
friend struct SyntaxFactory;

RC<TypeSyntaxData> CachedElemenType;

ArrayTypeSyntaxData(RC<RawSyntax> Raw,
const SyntaxData *Parent = nullptr,
CursorIndex IndexInParent = 0);
Expand Down
2 changes: 1 addition & 1 deletion lib/AST/GenericSignatureBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ struct GenericSignatureBuilder::ResolvedType {
// FIXME: this probably shouldn't exist, the potential archetype modelling of
// generic typealiases is fundamentally broken (aka they're not modelled at
// all), but some things with them mostly work, so we just maintain that,
// despite this causing crashes and weird behaviour.
// despite this causing crashes and weird behavior.
static ResolvedType forConcreteTypeFromGenericTypeAlias(Type t) {
return ResolvedType(t);
}
Expand Down
8 changes: 4 additions & 4 deletions lib/IRGen/GenCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ namespace {

bool claimError() {
auto Ret = CanUseError;
assert(CanUseError && "Mulitple error parameters?!");
assert(CanUseError && "Multiple error parameters?!");
CanUseError = false;
return Ret;
}
Expand Down Expand Up @@ -2450,7 +2450,7 @@ Explosion NativeConventionSchema::mapFromNative(IRGenModule &IGM,
? coercionTy
: overlappedCoercionTy;

// Allocate a temporary for the coersion.
// Allocate a temporary for the coercion.
Address temporary;
Size tempSize;
std::tie(temporary, tempSize) = allocateForCoercion(
Expand Down Expand Up @@ -2580,7 +2580,7 @@ Explosion NativeConventionSchema::mapIntoNative(IRGenModule &IGM,
? coercionTy
: overlappedCoercionTy;

// Allocate a temporary for the coersion.
// Allocate a temporary for the coercion.
Address temporary;
Size tempSize;
std::tie(temporary, tempSize) = allocateForCoercion(
Expand Down Expand Up @@ -2647,7 +2647,7 @@ void IRGenFunction::emitScalarReturn(SILType resultType, Explosion &result,
return;
}

// In the native case no coersion is needed.
// In the native case no coercion is needed.
if (isSwiftCCReturn) {
auto &nativeSchema =
IGM.getTypeInfo(resultType).nativeReturnValueSchema(IGM);
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Mandatory/AddressLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ void OpaqueStorageAllocation::replaceFunctionArgs() {
///
/// TODO: It might be faster to generate args directly from
/// SILFunctionConventions without drilling through the result SILType. But one
/// way or annother, we need to map result types into this context.
/// way or another, we need to map result types into this context.
unsigned
OpaqueStorageAllocation::insertIndirectResultParameters(unsigned argIdx,
SILType resultType) {
Expand Down
4 changes: 2 additions & 2 deletions lib/SILOptimizer/Transforms/PerformanceInliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static bool calleeHasPartialApplyWithOpenedExistentials(FullApplySite AI) {
SILFunction *Callee = AI.getReferencedFunction();
auto Subs = AI.getSubstitutions();

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

// IRGen cannot handle partial_applies containing opened_extistentials
// IRGen cannot handle partial_applies containing opened_existentials
// in its substitutions list.
if (calleeHasPartialApplyWithOpenedExistentials(AI)) {
return nullptr;
Expand Down
2 changes: 1 addition & 1 deletion lib/Syntax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ points for this library:
1. Represent Swift grammar and use naming conventions in accordance with The
Swift Programming Language book as much as possible, so people know what to
look for.
1. Accomodate "bad syntax" - humans are imperfect and source code is constantly
1. Accommodate "bad syntax" - humans are imperfect and source code is constantly
in a state of flux in an editor. Unforunately, we still live in a
character-centric world - the library shouldn't fall over on bad syntax just
because someone is in the middle of typing `struct`.
Expand Down
2 changes: 1 addition & 1 deletion lib/Syntax/SyntaxFactory.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===--- SyntaxBulider.cpp - Swift Syntax Builder Implementation *- C++ -*-===//
//===--- SyntaxFactory.cpp - Swift Syntax Builder Implementation *- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
Expand Down
4 changes: 2 additions & 2 deletions lib/Syntax/TypeSyntax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ OptionalTypeSyntax::withQuestionToken(RC<TokenSyntax> NewQuestionToken) const {
return Data->replaceSelf<OptionalTypeSyntax>(NewRaw);
}

#pragma mark - implicity-unwrapped-optional-type Data
#pragma mark - implicitly-unwrapped-optional-type Data

ImplicitlyUnwrappedOptionalTypeSyntaxData::
ImplicitlyUnwrappedOptionalTypeSyntaxData(RC<RawSyntax> Raw,
Expand Down Expand Up @@ -685,7 +685,7 @@ ImplicitlyUnwrappedOptionalTypeSyntaxData::makeBlank() {
SourcePresence::Present));
}

#pragma mark - implicity-unwrapped-optional-type API
#pragma mark - implicitly-unwrapped-optional-type API

ImplicitlyUnwrappedOptionalTypeSyntax::
ImplicitlyUnwrappedOptionalTypeSyntax(RC<SyntaxData> Root,
Expand Down
2 changes: 1 addition & 1 deletion test/Generics/protocol_type_aliases.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func requirementOnConcreteNestedTypeAlias<T>(_: T) where T: Q2, T.C == T.B.X {}
func concreteRequirementOnConcreteNestedTypeAlias<T>(_: T) where T: Q2, S<T.C> == T.B.X {}


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