Skip to content

Commit

Permalink
Remove instances of duplicated words
Browse files Browse the repository at this point in the history
  • Loading branch information
johankj committed Dec 3, 2015
1 parent 31feb1f commit fa76656
Show file tree
Hide file tree
Showing 30 changed files with 45 additions and 46 deletions.
2 changes: 1 addition & 1 deletion docs/HighLevelSILOptimizations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ To complete the semantics understood by the optimizer, we define these relations

interferes-with

Given idempotent ``OpA``, the the sequence "``OpA, OpB, OpA``" is
Given idempotent ``OpA``, the sequence "``OpA, OpB, OpA``" is
semantically equivalent to the sequence "``OpA, OpB``" *iff* ``OpB``
does not interfere with ``OpA``.

Expand Down
2 changes: 1 addition & 1 deletion docs/ObjectInitialization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ make use of ``self``. This is important uses of ``self``---say,
calling a method on ``self``---could end up referring to stored
properties before they are initialized. Consider the following
Objective-C code, where instance variables are initialized *after* the
call to the the superclass initializer::
call to the superclass initializer::

@interface A : NSObject
- (instancetype)init;
Expand Down
4 changes: 2 additions & 2 deletions docs/archive/LangRef.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ <h3 id="decl-import">import Declarations</h3>

<p>An import without an explicit import-kind names a module; all of the
module's members are imported into the current scope. The module's name is
also imported into the the current scope in order to allow qualified access
to the module's members, which can be useful for disambiguation.</p>
also imported into the current scope in order to allow qualified access to
the module's members, which can be useful for disambiguation.</p>

<p>If an import-kind is provided, the last element of the import path is
taken to be the name of a decl <em>within</em> the module named by the rest of
Expand Down
2 changes: 1 addition & 1 deletion docs/proposals/OptimizerEffects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ elt2's destructor can't change the uniqueness state of the arrays.::
setElement(&a.array, elt2, i)
}

In the the following loop it is not safe to hoist the makeUnique(&a)
In the following loop it is not safe to hoist the makeUnique(&a)
call even for trivial types. 'appendAssumingUnique' captures its argument 'a'
which forces a copy on 'a' on every iteration of the loop.::

Expand Down
2 changes: 1 addition & 1 deletion include/swift/AST/AvailabilitySpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class VersionConstraintAvailabilitySpec : public AvailabilitySpec {
/// deployment target. This specification is designed to ease porting
/// to new platforms. Because new platforms typically branch from
/// existing platforms, the wildcard allows an #available() check to do the
/// "right" thing (executing the the guarded branch) on the new platform without
/// "right" thing (executing the guarded branch) on the new platform without
/// requiring a modification to every availablity guard in the program. Note
/// that we still do compile-time availability checking with '*', so the
/// compiler will still catch references to potentially unavailable symbols.
Expand Down
4 changes: 2 additions & 2 deletions include/swift/ASTSectionImporter/ASTSectionImporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ namespace swift {
/// section, this function makes memory buffer copies of all swift
/// modules found in it and registers them using
/// registerMemoryBuffer() so they can be found by loadModule(). The
/// the access path of all modules found in the section is appended
/// to the vector foundModules.
/// access path of all modules found in the section is appended to
/// the vector foundModules.
/// \return true if successful.
bool parseASTSection(SerializedModuleLoader* SML, StringRef Data,
SmallVectorImpl<std::string> &foundModules);
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Basic/ClusteredBitVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class ClusteredBitVector {
///
/// c) 0 < LengthInBits < ChunkSizeInBits. In this case, Data contains
/// a single chunk, with its unused high bits zeroed like in the
/// the out-of-line case.
/// out-of-line case.
///
/// Therefore, an efficient way to test whether all bits are zero:
/// Data != 0. (isInlineAndAllClear()) Not *guaranteed* to find
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Runtime/ObjCBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ typedef struct objc_image_info {

// Class and metaclass construction from a compiler-generated memory image.
// cls and cls->isa must each be OBJC_MAX_CLASS_SIZE bytes.·
// Extra bytes not used the the metadata must be zero.
// Extra bytes not used the metadata must be zero.
// info is the same objc_image_info that would be emitted by a static compiler.
// Returns nil if a class with the same name already exists.
// Returns nil if the superclass is nil and the class is not marked as a root.
Expand Down
4 changes: 2 additions & 2 deletions lib/ClangImporter/ImportDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4332,7 +4332,7 @@ namespace {
return subscript;
}

/// Import the the accessor and its attributes.
/// Import the accessor and its attributes.
FuncDecl *importAccessor(clang::ObjCMethodDecl *clangAccessor,
DeclContext *dc) {
auto *accessor =
Expand Down Expand Up @@ -4711,7 +4711,7 @@ namespace {

/// \brief Import the members of all of the protocols to which the given
/// Objective-C class, category, or extension explicitly conforms into
/// the given list of members, so long as the the method was not already
/// the given list of members, so long as the method was not already
/// declared in the class.
///
/// FIXME: This whole thing is a hack, because name lookup should really
Expand Down
2 changes: 1 addition & 1 deletion lib/ClangImporter/ImporterImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ class LLVM_LIBRARY_VISIBILITY ClangImporter::Implementation
/// \returns The named type, or null if the type could not be found.
Type getNamedSwiftType(Module *module, StringRef name);

/// \brief Retrieve a specialization of the the named Swift type, e.g.,
/// \brief Retrieve a specialization of the named Swift type, e.g.,
/// UnsafeMutablePointer<T>.
///
/// \param module The name of the module in which the type should occur.
Expand Down
2 changes: 1 addition & 1 deletion lib/IDE/CodeCompletion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2709,7 +2709,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
// Ignore the internal members of Optional, like getLogicValue() and
// _getMirror().
// These are not commonly used and cause noise and confusion when showing
// among the the members of the underlying type. If someone really wants to
// among the members of the underlying type. If someone really wants to
// use them they can write them directly.

return true;
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/GenCast.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace irgen {
llvm::Value *casted;
};

/// \brief Convert the given value to the the exact destination type.
/// \brief Convert the given value to the exact destination type.
FailableCastResult emitClassIdenticalCast(IRGenFunction &IGF,
llvm::Value *from,
SILType fromType,
Expand Down
3 changes: 1 addition & 2 deletions lib/IRGen/IRBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ class IRBuilder : public IRBuilderBase {

/// A stable insertion point in the function. "Stable" means that
/// it will point to the same location in the function, even if
/// instructions are subsequently added to the the current basic
/// block.
/// instructions are subsequently added to the current basic block.
class StableIP {
/// Either an instruction that we're inserting after or the basic
/// block that we're inserting at the beginning of.
Expand Down
8 changes: 4 additions & 4 deletions lib/IRGen/IRGenSIL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ class IRGenSILFunction :
///
/// Unlike \c setLoweredObjCMethod, which finds the method in the actual
/// runtime type of the object, this routine starts at the static type of the
/// object and searches up the the class hierarchy (toward superclasses).
/// object and searches up the class hierarchy (toward superclasses).
///
/// \param searchType The class from which the Objective-C runtime will start
/// its search for a method.
Expand Down Expand Up @@ -1571,8 +1571,8 @@ void IRGenSILFunction::visitSILBasicBlock(SILBasicBlock *BB) {
auto DS = I.getDebugScope();
// Handle cleanup locations.
if (ILoc.getKind() == SILLocation::CleanupKind) {
// Cleanup locations point to the decl of the the value that
// is being destroyed (for diagnostic generation). As far as
// Cleanup locations point to the decl of the value that is
// being destroyed (for diagnostic generation). As far as
// the linetable is concerned, cleanups at the end of a
// lexical scope should point to the cleanup location, which
// is the location of the last instruction in the basic block.
Expand Down Expand Up @@ -2686,7 +2686,7 @@ mapTriviallyToInt(IRGenSILFunction &IGF, const EnumImplStrategy &EIS, SelectEnum
// Cast to the result type.
result = IGF.Builder.CreateIntCast(result, resultType, false);
if (commonOffset != 0) {
// The the offset, if any.
// The offset, if any.
auto *offsetConst = llvm::ConstantInt::get(resultType, commonOffset);
result = IGF.Builder.CreateAdd(result, offsetConst);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Parse/ParseDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4305,7 +4305,7 @@ ParserStatus Parser::parseDeclEnumCase(ParseDeclOptions Flags,
}
}

// For recovery, again make sure the the user didn't try to spell a switch
// For recovery, again make sure the user didn't try to spell a switch
// case label:
// 'case Identifier:' or
// 'case Identifier where ...:'
Expand Down
2 changes: 1 addition & 1 deletion lib/Parse/ParseStmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2022,7 +2022,7 @@ static BraceStmt *ConvertClosureToBraceStmt(Expr *E, ASTContext &Ctx) {
CE->setExplicitResultType(CE->getStartLoc(), empty);

// The trick here is that the ClosureExpr provides a DeclContext for stuff
// inside of it, so it isn't safe to just drop it and rip the the BraceStmt
// inside of it, so it isn't safe to just drop it and rip the BraceStmt
// from inside of it. While we could try to walk the body and update any
// Decls, ClosureExprs, etc within the body of the ClosureExpr, it is easier
// to just turn it into BraceStmt(CallExpr(TheClosure, VoidTuple)). This also
Expand Down
2 changes: 1 addition & 1 deletion lib/SILGen/SILGenForeignError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ emitBridgeReturnValueForForeignError(SILLocation loc,
return emitIntValue(*this, loc, bridgedType, 0);

// If an error is signalled by a zero result, but we've preserved
// the rest of the return value, then just return the the normal
// the rest of the return value, then just return the normal
// result, assuming (hoping!) that it isn't zero.
case ForeignErrorConvention::ZeroPreservedResult:
return result;
Expand Down
2 changes: 1 addition & 1 deletion lib/SILPasses/IPO/FunctionSignatureOpts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ updateOptimizedBBArgs(SILBuilder &Builder, SILBasicBlock *BB,
ProjTree.replaceValueUsesWithLeafUses(Builder, BB->getParent()->getLocation(),
LeafValues);

// Replace all uses of the the original arg with undef so it does not have any
// Replace all uses of the original arg with undef so it does not have any
// uses.
SILValue OrigArg = SILValue(BB->getBBArg(OldArgOffset));
OrigArg.replaceAllUsesWith(SILUndef::get(OrigArg.getType(),
Expand Down
2 changes: 1 addition & 1 deletion lib/SILPasses/Loop/LoopRotate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ bool swift::rotateLoop(SILLoop *L, DominanceInfo *DT, SILLoopInfo *LI,
// the latch.
Header->moveAfter(Latch);

// Merge the the old latch with the old header if possible.
// Merge the old latch with the old header if possible.
mergeBasicBlockWithSuccessor(Latch, DT, LI);

// Create a new preheader.
Expand Down
2 changes: 1 addition & 1 deletion lib/SILPasses/Scalar/RedundantLoadElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
/// value) and then aggregate them.
///
/// However, this may introduce a lot of extraction and aggregation which may
/// not be necessary. i.e. a store the the struct followed by a load from the
/// not be necessary. i.e. a store the struct followed by a load from the
/// struct. To solve this problem, when RLE detects that an load instruction
/// can be replaced by forwarded value, it will try to find minimum # of
/// extraction necessary to form the forwarded value. It will group the
Expand Down
12 changes: 6 additions & 6 deletions lib/SILPasses/Utils/CheckedCastBrJumpThreading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,15 +614,15 @@ bool CheckedCastBrJumpThreading::trySimplify(TermInst *Term) {
// TODO:
// If the dominating checked_cast_br is non-exact, then
// it is in general not safe to assume that current exact cast
// would have the same outcome. But if the the dominating
// non-exact checked_cast_br fails, then the current exact cast
// would always fail as well.
// would have the same outcome. But if the dominating non-exact
// checked_cast_br fails, then the current exact cast would
// always fail as well.
//
// If the dominating checked_cast_br is exact then then
// it is in general not safe to assume that the current non-exact
// cast would have the same outcome. But if the the dominating
// exact checked_cast_br succeeds, then the current non-exact
// cast would always succeed as well.
// cast would have the same outcome. But if the dominating exact
// checked_cast_br succeeds, then the current non-exact cast
// would always succeed as well.
//
// TODO: In some specific cases, it is possible to prove that
// success or failure of the dominating cast is equivalent to
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/MiscDiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ class AvailabilityWalker : public ASTWalker {
walkInContext(E->getBase(), MemberAccessContext::Getter);

ValueDecl *D = E->getMember().getDecl();
// Diagnose for the the member declaration itself.
// Diagnose for the member declaration itself.
if (diagAvailability(TC, D, E->getNameLoc(), DC)) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/TypeCheckNameLookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ LookupTypeResult TypeChecker::lookupMemberType(DeclContext *dc,
}
}

// Substitute the the base into the member's type.
// Substitute the base into the member's type.
if (Type memberType = substMemberTypeWithBase(dc->getParentModule(),
typeDecl, type,
/*isTypeReference=*/true)) {
Expand Down
8 changes: 4 additions & 4 deletions lib/Sema/TypeChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ class TypeRefinementContextBuilder : private ASTWalker {

// If the starting version range is not completely contained in the
// false flow version range then it must be the case that false flow range
// is strictly smaller than the the starting range (because the false flow
// is strictly smaller than the starting range (because the false flow
// range *is* contained in the starting range), so we should introduce a
// new refinement for the false flow.
if (!StartingTRC->getPotentialVersions().isContainedIn(FalseFlow)) {
Expand Down Expand Up @@ -1487,7 +1487,7 @@ void TypeChecker::diagnosePotentialUnavailability(
/// This class finds the innermost nodes of interest by walking
/// down the root until it has found the target range (in a Pre-visitor)
/// and then recording the innermost node on the way back up in the
/// the Post-visitors. It does its best to not search unnecessary subtrees,
/// Post-visitors. It does its best to not search unnecessary subtrees,
/// although this is complicated by the fact that not all nodes have
/// source range information.
class InnermostAncestorFinder : private ASTWalker {
Expand Down Expand Up @@ -1911,8 +1911,8 @@ static void fixAvailabilityForDecl(SourceRange ReferenceRange, const Decl *D,
SourceLoc InsertLoc;

// To avoid exposing the pattern binding declaration to the user, get the
// descriptive kind from one of the VarDecls. We get the the Fix-It
// location from the PatternBindingDecl unless the VarDecl has attributes,
// descriptive kind from one of the VarDecls. We get the Fix-It location
// from the PatternBindingDecl unless the VarDecl has attributes,
// in which case we get the start location of the VarDecl attributes.
DeclAttributes AttrsForLoc;
if (KindForDiagnostic == DescriptiveDeclKind::PatternBinding) {
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/core/Algorithm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public func split<S : CollectionType, R : BooleanType>(
fatalError("unavailable function can't be called")
}

/// Returns `true` iff the the initial elements of `s` are equal to `prefix`.
/// Returns `true` iff the initial elements of `s` are equal to `prefix`.
@available(*, unavailable, message="call the 'startsWith()' method on the sequence")
public func startsWith<
S0 : SequenceType, S1 : SequenceType
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/core/Builtin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func _canBeClass<T>(_: T.Type) -> Int8 {
return Int8(Builtin.canBeClass(T.self))
}

/// Returns the the bits of `x`, interpreted as having type `U`.
/// Returns the bits of `x`, interpreted as having type `U`.
///
/// - Warning: Breaks the guarantees of Swift's type system; use
/// with extreme care. There's almost always a better way to do
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/core/SequenceAlgorithms.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ if preds:
rethrows_ = "rethrows "
else:
comment = """
/// Return true iff the the initial elements of `self` are equal to `prefix`.
/// Return true iff the initial elements of `self` are equal to `prefix`.
/// Return true if `other` is empty."""
rethrows_ = ""
}%
Expand Down
2 changes: 1 addition & 1 deletion test/Sema/Inputs/availability_multi_other.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is used by Sema/availability_versions_multi.swift to
// test that we build enough of the type refinement context as needed to
// validate declarations when resolving declaration signatures.
// This file relies on the the minimum deployment target for OS X being 10.9.
// This file relies on the minimum deployment target for OS X being 10.9.

@available(OSX, introduced=10.11)
private class PrivateIntroduced10_11 { }
Expand Down
4 changes: 2 additions & 2 deletions unittests/SourceKit/SwiftLang/CursorInfoTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ TEST_F(CursorInfoTest, CursorInfoMustWaitDueDeclLoc) {
StringRef TextToReplace = "0";
replaceText(DocName, findOffset(TextToReplace, Contents), TextToReplace.size(),
ExpensiveInit);
// Edit over the the 'foo' decl.
// Edit over the 'foo' decl.
replaceText(DocName, FooOffs, strlen("foo"), "foo");

// Should wait for the new AST, because the declaration location for the 'foo'
Expand Down Expand Up @@ -328,7 +328,7 @@ TEST_F(CursorInfoTest, CursorInfoMustWaitDueOffset) {
StringRef TextToReplace = "0";
replaceText(DocName, findOffset(TextToReplace, Contents), TextToReplace.size(),
ExpensiveInit);
// Edit over the the 'foo' reference.
// Edit over the 'foo' reference.
replaceText(DocName, FooRefOffs, strlen("foo"), "foo");

// Should wait for the new AST, because the cursor location has been edited
Expand Down
2 changes: 1 addition & 1 deletion utils/gyb.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def tokenGenerator(self, baseTokens):


def nextToken(self):
"""Move to the the next token"""
"""Move to the next token"""
for kind in self.tokens:
return self.tokenKind

Expand Down

0 comments on commit fa76656

Please sign in to comment.