diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index d94e7b94cc560..d91a99b772ea6 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -82,7 +82,7 @@ if(LITRE_EXECUTABLE) VERBATIM ) - # Only update the real top-level CMakeLists.txt if something changed + # Only update the real top-level CMakeLists.txt if something changed add_custom_command( OUTPUT "litre-tests/CMakeLists.txt" diff --git a/docs/ErrorHandling.rst b/docs/ErrorHandling.rst index 547af4def253a..a7b14bd387477 100644 --- a/docs/ErrorHandling.rst +++ b/docs/ErrorHandling.rst @@ -578,7 +578,7 @@ of failability. One limitation of this approach is that we need to be able to reconstruct the selector to use when an overload of a method is introduced. For this -reason, the import is likely to be limited to methods where the error +reason, the import is likely to be limited to methods where the error parameter is the last one and the corresponding selector chunk is either ``error:`` or the first chunk (see below). Empirically, this seems to do the right thing for all but two sets of APIs in the diff --git a/docs/TypeChecker.rst b/docs/TypeChecker.rst index fb1856eb30645..21fd3b77a1319 100644 --- a/docs/TypeChecker.rst +++ b/docs/TypeChecker.rst @@ -106,7 +106,7 @@ the Swift type system: flavors of equality constraints: - Exact equality constraints, or "binding", written ``T0 := X`` - for some type variable ``T0`` and type ``X``, which requires + for some type variable ``T0`` and type ``X``, which requires that ``T0`` be exactly identical to ``X``; - Equality constraints, written ``X == Y`` for types ``X`` and ``Y``, which require ``X`` and ``Y`` to have the same type, diff --git a/docs/archive/LangRef.html b/docs/archive/LangRef.html index fecf8c1e67df7..5ee53490e7106 100644 --- a/docs/archive/LangRef.html +++ b/docs/archive/LangRef.html @@ -1093,7 +1093,7 @@

Function Types

The result type of a function type must be materializable. The argument type of a - function is always required to be parenthesized (a tuple). The behavior + function is always required to be parenthesized (a tuple). The behavior of function types may be modified with the autoclosure attribute.

diff --git a/docs/doxygen.intro b/docs/doxygen.intro index 8d953655bc6ab..f1ff0682a5829 100644 --- a/docs/doxygen.intro +++ b/docs/doxygen.intro @@ -4,7 +4,7 @@ /// Welcome to Swift. /// /// This documentation describes the @b internal software that makes -/// up Swift, not the @b external use of Swift. There are no instructions +/// up Swift, not the @b external use of Swift. There are no instructions /// here on how to use Swift, only the APIs that make up the software. For usage /// instructions, please see the programmer's guide or reference manual. /// diff --git a/docs/proposals/OptimizerEffects.rst b/docs/proposals/OptimizerEffects.rst index d5c11835af489..c22b626cf8b18 100644 --- a/docs/proposals/OptimizerEffects.rst +++ b/docs/proposals/OptimizerEffects.rst @@ -482,7 +482,7 @@ destructor can have arbitrary side-effects. Therefore, it is not valid to hoist the makeUnique in the code without proving that 'T's destructor cannot change the uniqueness state. This is trivial for trivial types but requires a more sophisticated analysis for class types (and in general cannot be disproved). In -following example we can only hoist makeUnique if we can prove that elt's, and +following example we can only hoist makeUnique if we can prove that elt's, and elt2's destructor can't change the uniqueness state of the arrays.:: for i in 0 ..< min(a.size, b.size) { diff --git a/include/swift/AST/SILOptions.h b/include/swift/AST/SILOptions.h index fd9916d5f6093..df6811cc56cd4 100644 --- a/include/swift/AST/SILOptions.h +++ b/include/swift/AST/SILOptions.h @@ -51,7 +51,7 @@ class SILOptions { OptimizeUnchecked }; - /// Controls how perform SIL linking. + /// Controls how to perform SIL linking. LinkingMode LinkMode = LinkNormal; /// Remove all runtime assertions during optimizations. diff --git a/include/swift/AST/Types.h b/include/swift/AST/Types.h index b49f287f7297e..8b181b29f3cc0 100644 --- a/include/swift/AST/Types.h +++ b/include/swift/AST/Types.h @@ -1924,7 +1924,7 @@ class ModuleType : public TypeBase { // Implement isa/cast/dyncast/etc. static bool classof(const TypeBase *T) { - return T->getKind() == TypeKind::Module; + return T->getKind() == TypeKind::Module; } private: diff --git a/include/swift/LLVMPasses/PassesFwd.h b/include/swift/LLVMPasses/PassesFwd.h index 3b9500dc151bf..bf36b95b5ddcf 100644 --- a/include/swift/LLVMPasses/PassesFwd.h +++ b/include/swift/LLVMPasses/PassesFwd.h @@ -1,4 +1,4 @@ -//===--- PassesFwd.h - Creation functions for LLVM passes ------*- C++ -*-===// +//===--- PassesFwd.h - Creation functions for LLVM passes -------*- C++ -*-===// // // This source file is part of the Swift.org open source project // diff --git a/include/swift/SIL/PatternMatch.h b/include/swift/SIL/PatternMatch.h index 6f1f55c468a4a..9848b691b4a26 100644 --- a/include/swift/SIL/PatternMatch.h +++ b/include/swift/SIL/PatternMatch.h @@ -136,7 +136,7 @@ inline match_combine_and m_CombineAnd(const LTy &L, const RTy &R) { /// Helper class to track the return type of vararg m_CombineOr matcher. template -struct OneOf_match; +struct OneOf_match; template struct OneOf_match { @@ -711,8 +711,8 @@ m_Ext(const T0 &Op0) { /// Matcher for any of the builtin CheckedTrunc instructions. template -inline typename OneOf_match, BuiltinApplyTy, - BuiltinApplyTy, BuiltinApplyTy>::Ty +inline typename OneOf_match, BuiltinApplyTy, + BuiltinApplyTy, BuiltinApplyTy>::Ty m_CheckedTrunc(const T0 &Op0) { return m_UToSCheckedTrunc(Op0) || m_SToUCheckedTrunc(Op0) || m_UToUCheckedTrunc(Op0) || m_SToSCheckedTrunc(Op0); diff --git a/include/swift/SIL/Projection.h b/include/swift/SIL/Projection.h index de8fb5b3c01f2..3df6b0c3d7de9 100644 --- a/include/swift/SIL/Projection.h +++ b/include/swift/SIL/Projection.h @@ -1,4 +1,4 @@ -//===--- Projection.h - Utilities for working with Projections -*- C++ -*-===// +//===--- Projection.h - Utilities for working with Projections --*- C++ -*-===// // // This source file is part of the Swift.org open source project // diff --git a/include/swift/SIL/SILInstruction.h b/include/swift/SIL/SILInstruction.h index 0de6537d4713f..b2eeb96b190f8 100644 --- a/include/swift/SIL/SILInstruction.h +++ b/include/swift/SIL/SILInstruction.h @@ -960,7 +960,7 @@ class FunctionRefInst : public LiteralInst { /// Construct a FunctionRefInst. /// /// \param DebugLoc The location of the reference. - /// \param F The function being referenced. + /// \param F The function being referenced. FunctionRefInst(SILDebugLocation *DebugLoc, SILFunction *F); public: diff --git a/include/swift/SILOptimizer/Utils/Local.h b/include/swift/SILOptimizer/Utils/Local.h index 5bc19e1a5cc1b..7606a55faf42f 100644 --- a/include/swift/SILOptimizer/Utils/Local.h +++ b/include/swift/SILOptimizer/Utils/Local.h @@ -434,7 +434,7 @@ class CastOptimizer { SILBasicBlock *SuccessBB, SILBasicBlock *FailureBB); - /// Optimize a cast from a Swift type implementing _ObjectiveCBridgeable + /// Optimize a cast from a Swift type implementing _ObjectiveCBridgeable /// into a bridged ObjC type. SILInstruction * optimizeBridgedSwiftToObjCCast(SILInstruction *Inst, diff --git a/lib/IDE/ReconstructType.cpp b/lib/IDE/ReconstructType.cpp index 88d5a59bef84d..fa7f9bed46d7c 100644 --- a/lib/IDE/ReconstructType.cpp +++ b/lib/IDE/ReconstructType.cpp @@ -799,7 +799,7 @@ FindNamedDecls (SwiftASTContext *ast, } } } - else if (result._module) + else if (result._module) { swift::Module::AccessPathTy access_path; llvm::SmallVector decls; diff --git a/lib/IRGen/GenObjC.cpp b/lib/IRGen/GenObjC.cpp index 1ff9b27e7450f..4261935b02474 100644 --- a/lib/IRGen/GenObjC.cpp +++ b/lib/IRGen/GenObjC.cpp @@ -341,7 +341,7 @@ llvm::Constant *IRGenModule::getAddrOfObjCSelectorRef(StringRef selector) { /// Get or create an ObjC protocol record. Always returns an i8*. We lazily /// create ObjC protocol_t records for protocols, storing references to the -/// record into the __objc_protolist and and __objc_protorefs sections to be +/// record into the __objc_protolist and __objc_protorefs sections to be /// fixed up by the runtime. /// /// It is not correct to use this value as a Protocol* reference directly. The @@ -356,7 +356,7 @@ llvm::Constant *IRGenModule::getAddrOfObjCProtocolRecord(ProtocolDecl *proto, /// Get or create an ObjC protocol reference. Always returns an i8**. We lazily /// create ObjC protocol_t records for protocols, storing references to the -/// record into the __objc_protolist and and __objc_protorefs sections to be +/// record into the __objc_protolist and __objc_protorefs sections to be /// fixed up by the runtime. llvm::Constant *IRGenModule::getAddrOfObjCProtocolRef(ProtocolDecl *proto, ForDefinition_t forDefinition) { diff --git a/lib/IRGen/GenTuple.cpp b/lib/IRGen/GenTuple.cpp index a62b5d8fc32ab..2d66368388460 100644 --- a/lib/IRGen/GenTuple.cpp +++ b/lib/IRGen/GenTuple.cpp @@ -11,7 +11,7 @@ //===----------------------------------------------------------------------===// // // This file implements IR generation for tuple types in Swift. This -// includes creating the IR type as well as emitting the primitive access +// includes creating the IR type as well as emitting the primitive access // operations. // // It is assumed in several places in IR-generation that the diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 02fea0ed2a09f..fe428b10e0278 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -4052,7 +4052,7 @@ Parser::parseDeclFunc(SourceLoc StaticLoc, StaticSpellingKind StaticSpelling, Identifier SimpleName; SourceLoc NameLoc = Tok.getLoc(); Token NonglobalTok = Tok; - bool NonglobalError = false; + bool NonglobalError = false; if (!(Flags & PD_AllowTopLevel) && !(Flags & PD_InProtocol) && diff --git a/lib/SIL/SILInstruction.cpp b/lib/SIL/SILInstruction.cpp index a0eff1a58173f..fefaed8638f63 100644 --- a/lib/SIL/SILInstruction.cpp +++ b/lib/SIL/SILInstruction.cpp @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// // -// This file defines the high-level SILInstruction classes used for SIL code. +// This file defines the high-level SILInstruction classes used for SIL code. // //===----------------------------------------------------------------------===// diff --git a/lib/SIL/SILInstructions.cpp b/lib/SIL/SILInstructions.cpp index 56a622166bf03..7dd2e8c6c6d29 100644 --- a/lib/SIL/SILInstructions.cpp +++ b/lib/SIL/SILInstructions.cpp @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// // -// This file defines the high-level SILInstruction classes used for SIL code. +// This file defines the high-level SILInstruction classes used for SIL code. // //===----------------------------------------------------------------------===// diff --git a/lib/SILGen/SILGenApply.cpp b/lib/SILGen/SILGenApply.cpp index 1bb6a92b8ce3a..dcb94b07342dd 100644 --- a/lib/SILGen/SILGenApply.cpp +++ b/lib/SILGen/SILGenApply.cpp @@ -3503,7 +3503,7 @@ namespace { closureTy); result = ManagedValue::forUnmanaged(partialApply); // Handle a regular call. - } else if (!specializedEmitter) { + } else if (!specializedEmitter) { result = gen.emitApply(uncurriedLoc.getValue(), mv, callee.getSubstitutions(), uncurriedArgs, diff --git a/lib/SILGen/SILGenFunction.h b/lib/SILGen/SILGenFunction.h index 10c271b1c7306..ed4f9f7999041 100644 --- a/lib/SILGen/SILGenFunction.h +++ b/lib/SILGen/SILGenFunction.h @@ -568,7 +568,7 @@ class LLVM_LIBRARY_VISIBILITY SILGenFunction SILDeclRef fromLevel, SILDeclRef toLevel); /// Generates a thunk from a foreign function to the native Swift convention. void emitForeignToNativeThunk(SILDeclRef thunk); - /// Generates a thunk from a native function to the conventions. + /// Generates a thunk from a native function to the conventions. void emitNativeToForeignThunk(SILDeclRef thunk); // Generate a nullary function that returns the given value. diff --git a/lib/SILOptimizer/Analysis/MemoryBehavior.cpp b/lib/SILOptimizer/Analysis/MemoryBehavior.cpp index 909256a494a6f..a0dd7af3eb8c5 100644 --- a/lib/SILOptimizer/Analysis/MemoryBehavior.cpp +++ b/lib/SILOptimizer/Analysis/MemoryBehavior.cpp @@ -108,9 +108,9 @@ class MemoryBehaviorVisitor #define OPERANDALIAS_MEMBEHAVIOR_INST(Name) \ MemBehavior visit##Name(Name *I) { \ for (Operand &Op : I->getAllOperands()) { \ - if (!AA->isNoAlias(Op.get(), V)) { \ + if (!AA->isNoAlias(Op.get(), V)) { \ DEBUG(llvm::dbgs() << " " #Name \ - " does alias inst. Returning Normal behavior.\n"); \ + " does alias inst. Returning Normal behavior.\n"); \ return I->getMemoryBehavior(); \ } \ } \ diff --git a/lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp b/lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp index 26a30671ceec9..c53ac56cecb5e 100644 --- a/lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp +++ b/lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp @@ -1701,7 +1701,7 @@ void LifetimeChecker::deleteDeadRelease(unsigned ReleaseID) { /// processNonTrivialRelease - We handle two kinds of release instructions here: /// destroy_addr for alloc_stack's and strong_release/dealloc_box for -/// alloc_box's. By the time that DI gets here, we've validated that all uses +/// alloc_box's. By the time that DI gets here, we've validated that all uses /// of the memory location are valid. Unfortunately, the uses being valid /// doesn't mean that the memory is actually initialized on all paths leading to /// a release. As such, we have to push the releases up the CFG to where the diff --git a/lib/SILOptimizer/Mandatory/PredictableMemOpt.cpp b/lib/SILOptimizer/Mandatory/PredictableMemOpt.cpp index 558ee452d148a..b05a38eb05038 100644 --- a/lib/SILOptimizer/Mandatory/PredictableMemOpt.cpp +++ b/lib/SILOptimizer/Mandatory/PredictableMemOpt.cpp @@ -925,7 +925,7 @@ bool AllocOptimize::tryToRemoveDeadAllocation() { bool AllocOptimize::doIt() { bool Changed = false; - // Don't try to optimize incomplete aggregates. + // Don't try to optimize incomplete aggregates. if (MemoryType.aggregateHasUnreferenceableStorage()) return false; diff --git a/lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp b/lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp index 678c53d902490..16058a0904f47 100644 --- a/lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp +++ b/lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp @@ -624,7 +624,7 @@ static SILValue getInitOrOpenExistential(AllocStackInst *ASI, SILValue &Src) { return SrcValue; } -/// find the init_existential, which could be used to determine a concrete +/// find the init_existential, which could be used to determine a concrete /// type of the \p Self. static SILInstruction *findInitExistential(FullApplySite AI, SILValue Self, CanType &OpenedArchetype) { @@ -1015,7 +1015,7 @@ static ApplyInst *optimizeCastThroughThinFunctionPointer( return nullptr; // The fourth parameter is a metatype of a bound generic type. Use it to - // obtain the type substitutions to apply. + // obtain the type substitutions to apply. auto MetaTy = dyn_cast(CastedParams[3].getType()); if (!MetaTy) return nullptr; diff --git a/lib/SILOptimizer/Transforms/DeadStoreElimination.cpp b/lib/SILOptimizer/Transforms/DeadStoreElimination.cpp index 5c3ee23055614..c1f25f4abc2fa 100644 --- a/lib/SILOptimizer/Transforms/DeadStoreElimination.cpp +++ b/lib/SILOptimizer/Transforms/DeadStoreElimination.cpp @@ -178,7 +178,7 @@ class DSEContext; /// 2. When a load instruction is encountered, remove the loaded location and /// any location it may alias with from the BBWriteSetMid. /// -/// 3. When an instruction reads from memory in an unknown way, the +/// 3. When an instruction reads from memory in an unknown way, the /// BBWriteSetMid bit is cleared if the instruction can read the /// corresponding LSLocation. /// diff --git a/lib/SILOptimizer/Transforms/RedundantOverflowCheckRemoval.cpp b/lib/SILOptimizer/Transforms/RedundantOverflowCheckRemoval.cpp index bf9207c2af57e..a87971a28582e 100644 --- a/lib/SILOptimizer/Transforms/RedundantOverflowCheckRemoval.cpp +++ b/lib/SILOptimizer/Transforms/RedundantOverflowCheckRemoval.cpp @@ -232,7 +232,7 @@ class RedundantOverflowCheckRemovalPass : public SILFunctionTransform { static bool isKnownPositive(SILValue N) { if (IntegerLiteralInst *NI = dyn_cast(N)) return NI->getValue().isStrictlyPositive(); - return false; + return false; } /// Return true if the absolute value of \p A is smaller than the @@ -278,7 +278,7 @@ class RedundantOverflowCheckRemovalPass : public SILFunctionTransform { if (F.Relationship == ValueRelation::SAdd) { // L + R already known to not trap at this point in the program. // And the following applies: - // L >= A and R >= B or (commutatively) R >= A and L >= B. + // L >= A and R >= B or (commutatively) R >= A and L >= B. SILValue A = BI->getOperand(0); SILValue B = BI->getOperand(1); if (knownRelation(A, L, ValueRelation::SLE) && @@ -307,7 +307,7 @@ class RedundantOverflowCheckRemovalPass : public SILFunctionTransform { if (F.Relationship == ValueRelation::UAdd) { // L + R already known to not trap at this point in the program. // And the following applies: - // L >= A and R >= B or (commutatively) R >= A and L >= B. + // L >= A and R >= B or (commutatively) R >= A and L >= B. SILValue A = BI->getOperand(0); SILValue B = BI->getOperand(1); if (knownRelation(A, L, ValueRelation::ULE) && @@ -368,7 +368,7 @@ class RedundantOverflowCheckRemovalPass : public SILFunctionTransform { if (F.Relationship == ValueRelation::UMul) { // L * R already known to not trap at this point in the program. // And the following applies: - // L >= A and R >= B or (commutatively) R >= A and L >= B. + // L >= A and R >= B or (commutatively) R >= A and L >= B. SILValue A = BI->getOperand(0); SILValue B = BI->getOperand(1); if (knownRelation(A, L, ValueRelation::ULE) && @@ -526,7 +526,7 @@ class RedundantOverflowCheckRemovalPass : public SILFunctionTransform { ValueRelation Rel; switch (BI->getBuiltinInfo().ID) { default: return; - case BuiltinValueKind::SAddOver: + case BuiltinValueKind::SAddOver: Rel = ValueRelation::SAdd; break; case BuiltinValueKind::UAddOver: diff --git a/lib/SILOptimizer/Transforms/SILCodeMotion.cpp b/lib/SILOptimizer/Transforms/SILCodeMotion.cpp index 22c436174bf58..c7189d675697d 100644 --- a/lib/SILOptimizer/Transforms/SILCodeMotion.cpp +++ b/lib/SILOptimizer/Transforms/SILCodeMotion.cpp @@ -896,7 +896,7 @@ static bool isRetainAvailableInSomeButNotAllPredecessors( }); // Check that there is no decrement or check from the increment to the end - // of the basic block. After we have hoisted the first release this release + // of the basic block. After we have hoisted the first release this release // would prevent further hoisting. Instead we check that no decrement or // check occurs up to this hoisted release. auto End = CheckUpToInstruction[Pred]; diff --git a/lib/SILOptimizer/Transforms/SILLowerAggregateInstrs.cpp b/lib/SILOptimizer/Transforms/SILLowerAggregateInstrs.cpp index d1780e2e2e610..534cc592c8931 100644 --- a/lib/SILOptimizer/Transforms/SILLowerAggregateInstrs.cpp +++ b/lib/SILOptimizer/Transforms/SILLowerAggregateInstrs.cpp @@ -156,7 +156,7 @@ static bool expandDestroyAddr(DestroyAddrInst *DA) { static bool expandReleaseValue(ReleaseValueInst *DV) { SILModule &Module = DV->getModule(); - SILBuilderWithScope Builder(DV); + SILBuilderWithScope Builder(DV); // Strength reduce destroy_addr inst into release/store if // we have a non-address only type. diff --git a/lib/SILOptimizer/Utils/CheckedCastBrJumpThreading.cpp b/lib/SILOptimizer/Utils/CheckedCastBrJumpThreading.cpp index 33a67007317e3..7b5b536ca4c2d 100644 --- a/lib/SILOptimizer/Utils/CheckedCastBrJumpThreading.cpp +++ b/lib/SILOptimizer/Utils/CheckedCastBrJumpThreading.cpp @@ -537,7 +537,7 @@ bool CheckedCastBrJumpThreading::areEquivalentConditionsAlongSomePaths() { } /// Check if conditions of CCBI and DomCCBI are equivalent along -/// all or at least some paths. +/// all or at least some paths. bool CheckedCastBrJumpThreading::areEquivalentConditionsAlongPaths() { // Are conditions equivalent along all paths? if (DomCondition == Condition) { diff --git a/lib/SILOptimizer/Utils/Devirtualize.cpp b/lib/SILOptimizer/Utils/Devirtualize.cpp index bbfb91eb5acb9..61fccf2c7d085 100644 --- a/lib/SILOptimizer/Utils/Devirtualize.cpp +++ b/lib/SILOptimizer/Utils/Devirtualize.cpp @@ -694,7 +694,7 @@ static ApplySite devirtualizeWitnessMethod(ApplySite AI, SILFunction *F, // Collect all the required substitutions. // // The complete set of substitutions may be different, e.g. because the found - // witness thunk F may have been created by a specialization pass and have + // witness thunk F may have been created by a specialization pass and have // additional generic parameters. SmallVector NewSubstList(Subs.begin(), Subs.end()); if (auto generics = AI.getOrigCalleeType()->getGenericSignature()) { diff --git a/lib/SILOptimizer/Utils/Local.cpp b/lib/SILOptimizer/Utils/Local.cpp index 322b4a65c8ee2..3268b8c48c1f2 100644 --- a/lib/SILOptimizer/Utils/Local.cpp +++ b/lib/SILOptimizer/Utils/Local.cpp @@ -1120,7 +1120,7 @@ ValueLifetime ValueLifetimeAnalysis::computeLastUsers() { // Casts Optimization and Simplification //===----------------------------------------------------------------------===// -/// \brief Get a substitution corresponding to the type witness. +/// \brief Get a substitution corresponding to the type witness. /// Inspired by ProtocolConformance::getTypeWitnessByName. static const Substitution * getTypeWitnessByName(ProtocolConformance *conformance, Identifier name) { @@ -1187,7 +1187,7 @@ optimizeBridgedObjCToSwiftCast(SILInstruction *Inst, auto Loc = Inst->getLoc(); // The conformance to _BridgedToObjectiveC is statically known. - // Retrieve the bridging operation to be used if a static conformance + // Retrieve the bridging operation to be used if a static conformance // to _BridgedToObjectiveC can be proven. FuncDecl *BridgeFuncDecl = isConditional diff --git a/lib/Sema/CSApply.cpp b/lib/Sema/CSApply.cpp index f457c2bc986e5..6c1d49ebf5aca 100644 --- a/lib/Sema/CSApply.cpp +++ b/lib/Sema/CSApply.cpp @@ -30,7 +30,7 @@ using namespace swift; using namespace constraints; -/// \brief Get a substitution corresponding to the type witness. +/// \brief Get a substitution corresponding to the type witness. /// Inspired by ProtocolConformance::getTypeWitnessByName. const Substitution * getTypeWitnessByName(ProtocolConformance *conformance, @@ -1348,13 +1348,13 @@ namespace { if (conformsToBridgedToObjectiveC) { // The conformance to _BridgedToObjectiveC is statically known. - // Retrieve the bridging operation to be used if a static conformance + // Retrieve the bridging operation to be used if a static conformance // to _BridgedToObjectiveC can be proven. fn = conditional ? tc.Context.getConditionallyBridgeFromObjectiveCBridgeable(&tc) : tc.Context.getForceBridgeFromObjectiveCBridgeable(&tc); } else { - // Retrieve the bridging operation to be used if a static conformance + // Retrieve the bridging operation to be used if a static conformance // to _BridgedToObjectiveC cannot be proven. fn = conditional ? tc.Context.getConditionallyBridgeFromObjectiveC(&tc) : tc.Context.getForceBridgeFromObjectiveC(&tc); diff --git a/lib/Sema/DerivedConformances.cpp b/lib/Sema/DerivedConformances.cpp index e0f6e9e2ebb40..fdf813d0ed32b 100644 --- a/lib/Sema/DerivedConformances.cpp +++ b/lib/Sema/DerivedConformances.cpp @@ -40,7 +40,7 @@ ValueDecl *DerivedConformance::getDerivableRequirement(NominalTypeDecl *nominal, // Retrieve the requirement. auto results = proto->lookupDirect(name); - return results.empty() ? nullptr : results.front(); + return results.empty() ? nullptr : results.front(); }; // Properties. diff --git a/lib/Sema/TypeCheckDecl.cpp b/lib/Sema/TypeCheckDecl.cpp index 51461155bee54..182bc323c5a32 100644 --- a/lib/Sema/TypeCheckDecl.cpp +++ b/lib/Sema/TypeCheckDecl.cpp @@ -4814,7 +4814,7 @@ class DeclChecker : public DeclVisitor { return true; } - /// Returns true if a diagnostic about an accessor being less available + /// Returns true if a diagnostic about an accessor being less available /// than the accessor it overrides would be redundant because we will /// already emit another diagnostic. static bool diff --git a/lib/Sema/TypeChecker.cpp b/lib/Sema/TypeChecker.cpp index b80830aabd04c..ed829723d18ba 100644 --- a/lib/Sema/TypeChecker.cpp +++ b/lib/Sema/TypeChecker.cpp @@ -1804,7 +1804,7 @@ static const Decl *ancestorTypeLevelDeclForAvailabilityFixit(const Decl *D) { /// declaration context containing the reference, make a best effort find up to /// three locations for potential fixits. /// -/// \param FoundVersionCheckNode Returns a node that can be wrapped in a +/// \param FoundVersionCheckNode Returns a node that can be wrapped in a /// if #available(...) { ... } version check to fix the unavailable reference, /// or None if such a node cannot be found. /// diff --git a/stdlib/public/core/String.swift b/stdlib/public/core/String.swift index b1cd66211de02..d0a6a65935d12 100644 --- a/stdlib/public/core/String.swift +++ b/stdlib/public/core/String.swift @@ -306,7 +306,7 @@ extension String { /// - returns: /// * an unspecified value less than zero if `lhs < rhs`, /// * zero if `lhs == rhs`, -/// * an unspecified value greater than zero if `lhs > rhs`. +/// * an unspecified value greater than zero if `lhs > rhs`. @_silgen_name("swift_stdlib_compareNSStringDeterministicUnicodeCollation") public func _stdlib_compareNSStringDeterministicUnicodeCollation( lhs: AnyObject, _ rhs: AnyObject diff --git a/tools/SourceKit/lib/Support/FuzzyStringMatcher.cpp b/tools/SourceKit/lib/Support/FuzzyStringMatcher.cpp index 1ccd03f08b940..a6bc6f9089d80 100644 --- a/tools/SourceKit/lib/Support/FuzzyStringMatcher.cpp +++ b/tools/SourceKit/lib/Support/FuzzyStringMatcher.cpp @@ -35,7 +35,7 @@ FuzzyStringMatcher::FuzzyStringMatcher(StringRef pattern_) assert(pattern.size() == lowercasePattern.size()); // FIXME: pull out the magic constants. - // This depends on the inner details of the matching algorithm and will need + // This depends on the inner details of the matching algorithm and will need // to be updated if we substantially alter it. if (pattern.size() == 1) { maxScore = 3.0 + // uppercase match diff --git a/tools/SourceKit/tools/sourcekitd/include/sourcekitd/sourcekitd.h b/tools/SourceKit/tools/sourcekitd/include/sourcekitd/sourcekitd.h index 35e5cb92bbe5b..714817bffdb4c 100644 --- a/tools/SourceKit/tools/sourcekitd/include/sourcekitd/sourcekitd.h +++ b/tools/SourceKit/tools/sourcekitd/include/sourcekitd/sourcekitd.h @@ -151,7 +151,7 @@ SOURCEKITD_PUBLIC SOURCEKITD_NONNULL1 SOURCEKITD_WARN_RESULT sourcekitd_uid_t sourcekitd_uid_get_from_buf(const char *buf, size_t length); -/// \brief Get the length of the string associated with a \c sourcekitd_uid_t. +/// \brief Get the length of the string associated with a \c sourcekitd_uid_t. SOURCEKITD_PUBLIC SOURCEKITD_NONNULL1 SOURCEKITD_WARN_RESULT size_t sourcekitd_uid_get_length(sourcekitd_uid_t obj); diff --git a/tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp b/tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp index ce1801a749fc2..20b4a33901e86 100644 --- a/tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp +++ b/tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp @@ -1754,7 +1754,7 @@ bool SKEditorConsumer::handleDocumentSubStructureElement(UIdent Kind, Node.set(KeyKind, Kind); Node.set(KeyOffset, Offset); Node.set(KeyLength, Length); - return true; + return true; } bool SKEditorConsumer::recordAffectedRange(unsigned Offset, unsigned Length) { diff --git a/utils/swift-project-settings.el b/utils/swift-project-settings.el index 9ab3fe62bb204..f94fc1f5831c6 100644 --- a/utils/swift-project-settings.el +++ b/utils/swift-project-settings.el @@ -198,7 +198,7 @@ Swift header should look like. ;; is non-empty, v1 all over again '(setq v2 (replace-regexp-in-string "\\` +" "" - (if (and comment-end (> (length comment-end) 0)) comment-end v1))) + (if (and comment-end (> (length comment-end) 0)) comment-end v1))) v1 "===--- " str & " " | -1 diff --git a/utils/vim/syntax/sil.vim b/utils/vim/syntax/sil.vim index a29810aa1a9da..c927345f71664 100644 --- a/utils/vim/syntax/sil.vim +++ b/utils/vim/syntax/sil.vim @@ -27,7 +27,7 @@ syn keyword swiftKeyword public hidden private shared public_external hidden_ext syn keyword swiftKeyword getter setter allocator initializer enumelt destroyer globalaccessor objc skipwhite syn keyword swiftKeyword alloc_stack alloc_ref alloc_ref_dynamic alloc_box dealloc_stack dealloc_box dealloc_ref skipwhite syn keyword swiftKeyword debug_value debug_value_addr skipwhite -syn keyword swiftKeyword load store assign mark_uninitialized mark_function_escape copy_addr destroy_addr index_addr index_raw_pointer to skipwhite +syn keyword swiftKeyword load store assign mark_uninitialized mark_function_escape copy_addr destroy_addr index_addr index_raw_pointer to skipwhite syn keyword swiftKeyword strong_retain strong_release strong_retain_unowned ref_to_unowned unowned_to_ref unowned_retain unowned_release load_weak store_weak fix_lifetime skipwhite syn keyword swiftKeyword function_ref integer_literal float_literal string_literal global_addr skipwhite syn keyword swiftKeyword class_method super_method witness_method dynamic_method skipwhite