Skip to content

Commit 36d7072

Browse files
Remove immediately adjacent repeated words ("the the", "for for", "an an", etc.).
1 parent 35ceb6f commit 36d7072

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+66
-66
lines changed

docs/archive/LangRef.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,7 @@ <h3 id="expr-closure">Closure Expression</h3>
19011901
<i>// both have type 'Int'.</i>
19021902
magic(42, { $0 &lt; $1 })
19031903

1904-
<i>// Compare the other way way.</i>
1904+
<i>// Compare the other way.</i>
19051905
magic(42, { $1 &lt; $0 })
19061906

19071907
<i>// Provide parameter names, but infer the types.</i>

docs/proposals/rejected/Bridging Container Protocols to Class Clusters.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Here's what I propose instead:
2424

2525
Although I'll be talking about arrays in this proposal, I think the same
2626
approach would work for ``NSDictionary`` and ``NSSet`` as well, mapping them
27-
to generic containers for associative map and and unordered container protocols
27+
to generic containers for associative map and unordered container protocols
2828
respectively.
2929

3030
NSArray vs Array

docs/proposals/valref.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ When a reference to an array appears without a variable name, it can
179179
be written using the `usual syntax`__::
180180

181181
var f : ()->ref Int[42] // a closure returning a reference to an array
182-
var b : ref Int[42] // equivalent to to "ref b : Int[42]"
182+
var b : ref Int[42] // equivalent to "ref b : Int[42]"
183183

184184
__ `standalone types`_
185185

@@ -192,7 +192,7 @@ brackets, that most users will never touch, e.g.::
192192
var z : Array<ref Array<Int,42>, 2> // an array of 2 references to arrays
193193
ref a : Array<Int,42> // a reference to an array of 42 integers
194194
var f : ()->ref Array<Int,42> // a closure returning a reference to an array
195-
var b : ref Array<Int,42> // equivalent to to "ref b : Int[42]"
195+
var b : ref Array<Int,42> // equivalent to "ref b : Int[42]"
196196

197197
Rules for copying array elements follow those of instance variables.
198198

include/swift/AST/ASTContext.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ class ASTContext {
590590
/// one.
591591
void loadExtensions(NominalTypeDecl *nominal, unsigned previousGeneration);
592592

593-
/// \brief Load the methods within the given class that that produce
593+
/// \brief Load the methods within the given class that produce
594594
/// Objective-C class or instance methods with the given selector.
595595
///
596596
/// \param classDecl The class in which we are searching for @objc methods.
@@ -604,7 +604,7 @@ class ASTContext {
604604
///
605605
/// \param previousGeneration The previous generation with which this
606606
/// callback was invoked. The list of methods will already contain all of
607-
/// the results from generations up and and including \c previousGeneration.
607+
/// the results from generations up and including \c previousGeneration.
608608
///
609609
/// \param methods The list of @objc methods in this class that have this
610610
/// selector and are instance/class methods as requested. This list will be

include/swift/AST/Availability.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class VersionRange {
3535
// The concretization of lattice elements is:
3636
// Empty: empty
3737
// All: all versions
38-
// x.y.x: all versions greater than or equal to to x.y.z
38+
// x.y.x: all versions greater than or equal to x.y.z
3939

4040
enum class ExtremalRange { Empty, All };
4141

include/swift/AST/Decl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2798,7 +2798,7 @@ class NominalTypeDecl : public TypeDecl, public DeclContext,
27982798
return ValidatingGenericSignature;
27992799
}
28002800

2801-
/// \brief Returns true if this this decl contains delayed value or protocol
2801+
/// \brief Returns true if this decl contains delayed value or protocol
28022802
/// declarations.
28032803
bool hasDelayedMembers() const {
28042804
return NominalTypeDeclBits.HasDelayedMembers;

include/swift/AST/ModuleLoader.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class ModuleLoader {
9595
virtual void loadExtensions(NominalTypeDecl *nominal,
9696
unsigned previousGeneration) { }
9797

98-
/// \brief Load the methods within the given class that that produce
98+
/// \brief Load the methods within the given class that produce
9999
/// Objective-C class or instance methods with the given selector.
100100
///
101101
/// \param classDecl The class in which we are searching for @objc methods.
@@ -109,7 +109,7 @@ class ModuleLoader {
109109
///
110110
/// \param previousGeneration The previous generation with which this
111111
/// callback was invoked. The list of methods will already contain all of
112-
/// the results from generations up and and including \c previousGeneration.
112+
/// the results from generations up and including \c previousGeneration.
113113
///
114114
/// \param methods The list of @objc methods in this class that have this
115115
/// selector and are instance/class methods as requested. This list will be

include/swift/AST/Types.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2576,12 +2576,12 @@ inline bool isConsumedParameter(ParameterConvention conv) {
25762576
}
25772577

25782578
enum class InoutAliasingAssumption {
2579-
/// Assume that that an inout indirect parameter may alias other objects.
2579+
/// Assume that an inout indirect parameter may alias other objects.
25802580
/// This is the safe assumption an optimizations should make if it may break
25812581
/// memory safety in case the inout aliasing rule is violation.
25822582
Aliasing,
25832583

2584-
/// Assume that that an inout indirect parameter cannot alias other objects.
2584+
/// Assume that an inout indirect parameter cannot alias other objects.
25852585
/// Optimizations should only use this if they can guarantee that they will
25862586
/// not break memory safety even if the inout aliasing rule is violated.
25872587
NotAliasing

include/swift/SIL/SILCloner.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace swift {
2929
/// operations requiring cloning (while possibly modifying, at the same time)
3030
/// instruction sequences.
3131
///
32-
/// By default, this visitor will not do anything useful when when called on a
32+
/// By default, this visitor will not do anything useful when called on a
3333
/// basic block, or function; subclasses that want to handle those should
3434
/// implement the appropriate visit functions and/or provide other entry points.
3535
template<typename ImplClass>

include/swift/SIL/TypeLowering.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class TypeLowering {
232232
virtual void emitDestroyAddress(SILBuilder &B, SILLocation loc,
233233
SILValue value) const = 0;
234234

235-
/// Given a +1 r-value which are are claiming ownership of, destroy it.
235+
/// Given a +1 r-value which we are claiming ownership of, destroy it.
236236
///
237237
/// Note that an r-value might be an address.
238238
virtual void emitDestroyRValue(SILBuilder &B, SILLocation loc,

include/swift/SILOptimizer/Utils/Local.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ class CastOptimizer {
485485
SILInstruction *
486486
optimizeUnconditionalCheckedCastAddrInst(UnconditionalCheckedCastAddrInst *Inst);
487487

488-
/// Check if is is a bridged cast and optimize it.
488+
/// Check if it is a bridged cast and optimize it.
489489
/// May change the control flow.
490490
SILInstruction *
491491
optimizeBridgedCasts(SILInstruction *Inst,

include/swift/Serialization/ModuleFile.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ class ModuleFile : public LazyMemberLoader {
519519
/// Note that this may cause other decls to load as well.
520520
void loadExtensions(NominalTypeDecl *nominal);
521521

522-
/// \brief Load the methods within the given class that that produce
522+
/// \brief Load the methods within the given class that produce
523523
/// Objective-C class or instance methods with the given selector.
524524
///
525525
/// \param classDecl The class in which we are searching for @objc methods.

lib/AST/ConformanceLookupTable.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ void ConformanceLookupTable::addProtocols(NominalTypeDecl *nominal,
487487
void ConformanceLookupTable::expandImpliedConformances(NominalTypeDecl *nominal,
488488
DeclContext *dc,
489489
LazyResolver *resolver) {
490-
// Note: recursive type-checking implies that that AllConformances
490+
// Note: recursive type-checking implies that AllConformances
491491
// may be reallocated during this traversal, so pay the lookup cost
492492
// during each iteration.
493493
for (unsigned i = 0; i != AllConformances[dc].size(); ++i) {

lib/AST/Stmt.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ bool DoCatchStmt::isSyntacticallyExhaustive() const {
248248
}
249249

250250
void LabeledConditionalStmt::setCond(StmtCondition e) {
251-
// When set set a condition into a Conditional Statement, inform each of the
251+
// When set a condition into a Conditional Statement, inform each of the
252252
// variables bound in any patterns that this is the owning statement for the
253253
// pattern.
254254
for (auto &elt : e)

lib/ClangImporter/ImportDecl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4469,7 +4469,7 @@ namespace {
44694469
auto superclass
44704470
= cast<ClassDecl>(classDecl->getSuperclass()->getAnyNominal());
44714471

4472-
// If we we have a superclass, import from it.
4472+
// If we have a superclass, import from it.
44734473
if (auto superclassClangDecl = superclass->getClangDecl()) {
44744474
if (isa<clang::ObjCInterfaceDecl>(superclassClangDecl)) {
44754475
inheritConstructors(superclass->getMembers(), kind);

lib/IDE/CodeCompletion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ static Stmt *findNearestStmt(const AbstractFunctionDecl *AFD, SourceLoc Loc,
326326
auto &SM = AFD->getASTContext().SourceMgr;
327327
assert(SM.rangeContainsTokenLoc(AFD->getSourceRange(), Loc));
328328
StmtFinder Finder(SM, Loc, Kind);
329-
// FIXME(thread-safety): the walker is is mutating the AST.
329+
// FIXME(thread-safety): the walker is mutating the AST.
330330
const_cast<AbstractFunctionDecl *>(AFD)->walk(Finder);
331331
return Finder.getFoundStmt();
332332
}

lib/IDE/SourceEntityWalker.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ bool SourceEntityWalker::visitSubscriptReference(ValueDecl *D,
460460
CharSourceRange Range,
461461
bool IsOpenBracket) {
462462
// Most of the clients treat subscript reference the same way as a
463-
// regular reference when called on the open open bracket and
463+
// regular reference when called on the open bracket and
464464
// ignore the closing one.
465465
return IsOpenBracket ? visitDeclReference(D, Range, nullptr, Type()) : true;
466466
}

lib/IRGen/LoadableTypeInfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class LoadableTypeInfo : public FixedTypeInfo {
129129
Explosion &targetExplosion,
130130
unsigned offset) const = 0;
131131

132-
/// Load a a reference counted pointer from an address.
132+
/// Load a reference counted pointer from an address.
133133
/// Return the loaded pointer value.
134134
virtual LoadedRef loadRefcountedPtr(IRGenFunction &IGF, SourceLoc loc,
135135
Address addr) const;

lib/SIL/Projection.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ processUsersOfValue(ProjectionTree &Tree,
824824

825825
assert(User->getNumTypes() == 1 && "Projections should only have one use");
826826

827-
// Look up the Node for this projection add add {User, ChildNode} to the
827+
// Look up the Node for this projection add {User, ChildNode} to the
828828
// worklist.
829829
//
830830
// *NOTE* This means that we will process ChildNode multiple times

lib/SILGen/RValue.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ class EmitBBArguments : public CanTypeVisitor<EmitBBArguments,
279279
/// RValue) into an initialization. The RValue will have one scalar ManagedValue
280280
/// for each exploded tuple element in the RValue, so this needs to make the
281281
/// shape of the initialization match the available elements. This can be done
282-
/// one one of two ways:
282+
/// one of two ways:
283283
///
284284
/// 1) recursively scalarize down the initialization on demand if the type of
285285
/// the RValue is tuple type and the initialization supports it.

lib/SILGen/SILGenApply.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ static Callee prepareArchetypeCallee(SILGenFunction &gen, SILLocation loc,
789789
constant, substFnType, loc);
790790
}
791791

792-
/// An ASTVisitor for decomposing a a nesting of ApplyExprs into an initial
792+
/// An ASTVisitor for decomposing a nesting of ApplyExprs into an initial
793793
/// Callee and a list of CallSites. The CallEmission class below uses these
794794
/// to generate the actual SIL call.
795795
///

lib/SILOptimizer/ARC/GlobalARCSequenceDataflow.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void ARCSequenceDataflowEvaluator::mergePredecessors(
149149
ARCBBState &PredBBState = PredDataHandle->getState();
150150

151151
// If we found the state but the state is for a trap BB, skip it. Trap BBs
152-
// leak all reference counts and do not reference reference semantic objects
152+
// leak all reference counts and do not reference semantic objects
153153
// in any manner.
154154
//
155155
// TODO: I think this is a copy paste error, since we a trap BB should have

lib/SILOptimizer/Analysis/ArraySemantic.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ bool swift::ArraySemanticsCall::replaceByValue(SILValue V) {
622622
if (!ASI)
623623
return false;
624624

625-
// Expect a check_subscript call or the empty dependence dependence.
625+
// Expect a check_subscript call or the empty dependence.
626626
auto SubscriptCheck = SemanticsCall->getArgument(3);
627627
ArraySemanticsCall Check(SubscriptCheck.getDef(), "array.check_subscript");
628628
auto *EmptyDep = dyn_cast<StructInst>(SubscriptCheck);

lib/SILOptimizer/Analysis/ClassHierarchyAnalysis.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void ClassHierarchyAnalysis::init() {
7777
/// \brief Get all subclasses of a given class.
7878
/// Does not include any direct subclasses of given base class.
7979
///
80-
/// \p Base base class, whose direct subclasses are to be excluded
80+
/// \p Base class, whose direct subclasses are to be excluded
8181
/// \p Current class, whose direct and indirect subclasses are
8282
/// to be collected.
8383
/// \p IndirectSubs placeholder for collected results

lib/SILOptimizer/Analysis/ValueTracking.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static bool valueMayBeCaptured(SILValue V, CaptureException Exception) {
212212
DEBUG(llvm::dbgs() << " Checking for capture.\n");
213213

214214

215-
// All all uses of V to the worklist.
215+
// All uses of V to the worklist.
216216
for (auto *UI : V.getUses()) {
217217
// If we have more uses than the threshold, be conservative and bail so we
218218
// don't use too much compile time.

lib/SILOptimizer/IPO/CapturePromotion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ examineAllocBoxInst(AllocBoxInst *ABI, ReachabilityInfo &RI,
783783
continue;
784784
}
785785

786-
// Verify that this this use does not otherwise allow the alloc_box to
786+
// Verify that this use does not otherwise allow the alloc_box to
787787
// escape.
788788
if (!isNonescapingUse(O, Mutations))
789789
return false;

lib/SILOptimizer/IPO/ClosureSpecializer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ void ClosureSpecializer::gatherCallSites(
721721

722722
// Go through all uses of our closure.
723723
for (auto *Use : II.getUses()) {
724-
// If this use use is not an apply inst or an apply inst with
724+
// If this use is not an apply inst or an apply inst with
725725
// substitutions, there is nothing interesting for us to do, so
726726
// continue...
727727
auto AI = FullApplySite::isa(Use->getUser());

lib/SILOptimizer/LoopTransforms/LoopUnroll.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static void redirectTerminator(SILBasicBlock *Latch, unsigned CurLoopIter,
202202
// BackegdeBlock:
203203
// br HeaderBlock:
204204
//
205-
// Or a a conditional branch back to the header.
205+
// Or a conditional branch back to the header.
206206
// HeaderBlock:
207207
// ...
208208
// cond_br %cond, ExitBlock, HeaderBlock

lib/SILOptimizer/Transforms/ArrayElementValuePropagation.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ bool ArrayAllocation::isInitializationWithKnownElements() {
165165
/// Propagate the elements of an array literal to get_element method calls on
166166
/// the same array.
167167
///
168-
/// We have to prove that the the array value is not changed in between the
168+
/// We have to prove that the array value is not changed in between the
169169
/// creation and the method call to get_element.
170170
bool ArrayAllocation::findValueReplacements() {
171171
if (!isInitializationWithKnownElements())

lib/SILOptimizer/Transforms/SimplifyCFG.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2030,7 +2030,7 @@ static bool tryMoveCondFailToPreds(SILBasicBlock *BB) {
20302030

20312031
// Find the underlying condition value of the cond_fail.
20322032
// We only accept single uses. This is not a correctness check, but we only
2033-
// want to to the optimization if the condition gets dead after moving the
2033+
// want to the optimization if the condition gets dead after moving the
20342034
// cond_fail.
20352035
bool inverted = false;
20362036
SILValue cond = skipInvert(CFI->getOperand(), inverted, true);

lib/SILOptimizer/Utils/Local.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ static Type getCastFromObjC(SILModule &M, CanType source, CanType target) {
11541154
}
11551155

11561156
/// Create a call of _forceBridgeFromObjectiveC_bridgeable or
1157-
/// _conditionallyBridgeFromObjectiveC_bridgeable which converts an an ObjC
1157+
/// _conditionallyBridgeFromObjectiveC_bridgeable which converts an ObjC
11581158
/// instance into a corresponding Swift type, conforming to
11591159
/// _ObjectiveCBridgeable.
11601160
SILInstruction *
@@ -1921,7 +1921,7 @@ CastOptimizer::optimizeCheckedCastBranchInst(CheckedCastBranchInst *Inst) {
19211921
// Should be in the same BB.
19221922
if (ASI->getParent() != EMI->getParent())
19231923
return nullptr;
1924-
// Check if this alloc_stac is is only initialized once by means of
1924+
// Check if this alloc_stac is only initialized once by means of
19251925
// single init_existential_addr.
19261926
bool isLegal = true;
19271927
// init_existential instruction used to initialize this alloc_stack.
@@ -1982,7 +1982,7 @@ CastOptimizer::optimizeCheckedCastBranchInst(CheckedCastBranchInst *Inst) {
19821982
// Should be in the same BB.
19831983
if (ASRI->getParent() != EMI->getParent())
19841984
return nullptr;
1985-
// Check if this alloc_stac is is only initialized once by means of
1985+
// Check if this alloc_stack is only initialized once by means of
19861986
// a single initt_existential_ref.
19871987
bool isLegal = true;
19881988
for (auto Use: getNonDebugUses(*ASRI)) {

lib/Sema/CSDiag.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -2878,7 +2878,7 @@ typeCheckChildIndependently(Expr *subExpr, Type convertType,
28782878

28792879
// If we have no contextual type information and the subexpr is obviously a
28802880
// overload set, don't recursively simplify this. The recursive solver will
2881-
// sometimes pick one based on arbitrary ranking behavior behavior (e.g. like
2881+
// sometimes pick one based on arbitrary ranking behavior (e.g. like
28822882
// which is the most specialized) even then all the constraints are being
28832883
// fulfilled by UnresolvedType, which doesn't tell us anything.
28842884
if (convertTypePurpose == CTP_Unused &&
@@ -3217,7 +3217,7 @@ bool FailureDiagnosis::diagnoseContextualConversionError() {
32173217

32183218
exprType = exprType->getRValueType();
32193219

3220-
// Special case a some common common conversions involving Swift.String
3220+
// Special case of some common conversions involving Swift.String
32213221
// indexes, catching cases where people attempt to index them with an integer.
32223222
if (isIntegerToStringIndexConversion(exprType, contextualType, CS)) {
32233223
diagnose(expr->getLoc(), diag::string_index_not_integer,
@@ -3320,7 +3320,7 @@ typeCheckArgumentChildIndependently(Expr *argExpr, Type argType,
33203320
argType = Type();
33213321

33223322

3323-
// FIXME: This should all just be a matter of getting type type of the
3323+
// FIXME: This should all just be a matter of getting the type of the
33243324
// sub-expression, but this doesn't work well when typeCheckChildIndependently
33253325
// is over-conservative w.r.t. TupleExprs.
33263326
auto *TE = dyn_cast<TupleExpr>(argExpr);

lib/Sema/CSSolver.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ static bool tryTypeVariableBindings(
10941094
for (auto binding : bindings) {
10951095
auto type = binding.BindingType;
10961096

1097-
// After our first pass, note that that we've explored these
1097+
// After our first pass, note that we've explored these
10981098
// types.
10991099
if (tryCount == 0)
11001100
exploredTypes.insert(type->getCanonicalType());

lib/Sema/CodeSynthesis.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ static void maybeMarkTransparent(FuncDecl *accessor,
764764
}
765765

766766
/// Synthesize the body of a trivial getter. For a non-member vardecl or one
767-
/// which is not an override of a base class property, it performs a a direct
767+
/// which is not an override of a base class property, it performs a direct
768768
/// storage load. For an override of a base member property, it chains up to
769769
/// super.
770770
static void synthesizeTrivialGetter(FuncDecl *getter,

lib/Sema/ConstraintLocator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ namespace constraints {
5151
/// to indicate constraints on its argument or result type.
5252
class ConstraintLocator : public llvm::FoldingSetNode {
5353
public:
54-
/// \brief Describes the kind of a a particular path element, e.g.,
54+
/// \brief Describes the kind of a particular path element, e.g.,
5555
/// "tuple element", "call result", "base of member lookup", etc.
5656
enum PathElementKind : unsigned char {
5757
/// \brief The argument of function application.

lib/Sema/ConstraintSystem.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2426,7 +2426,7 @@ class ConstraintSystem {
24262426
}
24272427

24282428
/// \brief Reorder the disjunctive clauses for a given expression to
2429-
/// increase the likelihood that a favored constraint will be be successfully
2429+
/// increase the likelihood that a favored constraint will be successfully
24302430
/// resolved before any others.
24312431
void optimizeConstraints(Expr *e);
24322432

0 commit comments

Comments
 (0)