Skip to content

Commit cd9d2b5

Browse files
committed
Merge pull request #787 from practicalswift/typos-in-code
Fix typos in code (non-comment typos)
2 parents afde6d3 + 73e60ea commit cd9d2b5

File tree

9 files changed

+23
-23
lines changed

9 files changed

+23
-23
lines changed

include/swift/SILOptimizer/Analysis/EscapeAnalysis.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class EscapeAnalysis : public BottomUpIPAnalysis {
192192
}
193193

194194
/// Finds a successor node in the outgoing defer edges.
195-
llvm::SmallVectorImpl<CGNode *>::iterator findDefered(CGNode *Def) {
195+
llvm::SmallVectorImpl<CGNode *>::iterator findDeferred(CGNode *Def) {
196196
return std::find(defersTo.begin(), defersTo.end(), Def);
197197
}
198198

@@ -209,7 +209,7 @@ class EscapeAnalysis : public BottomUpIPAnalysis {
209209
}
210210

211211
/// Adds a defer-edge to another node \p To. Not done if \p To is this node.
212-
bool addDefered(CGNode *To) {
212+
bool addDeferred(CGNode *To) {
213213
assert(!To->isMerged);
214214
if (To == this)
215215
return false;

lib/AST/Pattern.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using namespace swift;
2525
llvm::raw_ostream &swift::operator<<(llvm::raw_ostream &OS, PatternKind kind) {
2626
switch (kind) {
2727
case PatternKind::Paren:
28-
return OS << "parethesized pattern";
28+
return OS << "parenthesized pattern";
2929
case PatternKind::Tuple:
3030
return OS << "tuple pattern";
3131
case PatternKind::Named:

lib/IRGen/GenProto.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2728,7 +2728,7 @@ llvm::Value *MetadataPath::followComponent(IRGenFunction &IGF,
27282728
llvm_unreachable("following an impossible path!");
27292729

27302730
}
2731-
llvm_unreachable("bad metata path component");
2731+
llvm_unreachable("bad metadata path component");
27322732
}
27332733

27342734
/// Collect any required metadata for a witness method from the end of

lib/SILOptimizer/ARC/GlobalLoopARCSequenceDataflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ void LoopARCSequenceDataflowEvaluator::mergeSuccessors(const LoopRegion *Region,
171171
}
172172

173173
// Otherwise, we treat it as unknown control flow.
174-
DEBUG(llvm::dbgs() << " Cleaing state b/c of early exit\n");
174+
DEBUG(llvm::dbgs() << " Clearing state b/c of early exit\n");
175175
State.clear();
176176
break;
177177
}

lib/SILOptimizer/Analysis/EscapeAnalysis.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ EscapeAnalysis::CGNode *EscapeAnalysis::ConnectionGraph::getContentNode(
126126
}
127127

128128
bool EscapeAnalysis::ConnectionGraph::addDeferEdge(CGNode *From, CGNode *To) {
129-
if (!From->addDefered(To))
129+
if (!From->addDeferred(To))
130130
return false;
131131

132132
CGNode *FromPointsTo = From->pointsTo;
@@ -167,7 +167,7 @@ void EscapeAnalysis::ConnectionGraph::mergeAllScheduledNodes() {
167167
PredNode->setPointsTo(To);
168168
} else {
169169
assert(PredNode != From);
170-
auto Iter = PredNode->findDefered(From);
170+
auto Iter = PredNode->findDeferred(From);
171171
assert(Iter != PredNode->defersTo.end() &&
172172
"Incoming defer-edge not found in predecessor's defer list");
173173
PredNode->defersTo.erase(Iter);
@@ -280,10 +280,10 @@ updatePointsTo(CGNode *InitialNode, CGNode *pointsTo) {
280280
}
281281

282282
// Add all adjacent nodes to the WorkList.
283-
for (auto *Defered : Node->defersTo) {
284-
if (!Defered->isInWorkList) {
285-
WorkList.push_back(Defered);
286-
Defered->isInWorkList = true;
283+
for (auto *Deferred : Node->defersTo) {
284+
if (!Deferred->isInWorkList) {
285+
WorkList.push_back(Deferred);
286+
Deferred->isInWorkList = true;
287287
}
288288
}
289289
for (Predecessor Pred : Node->Preds) {
@@ -506,10 +506,10 @@ bool EscapeAnalysis::ConnectionGraph::mergeFrom(ConnectionGraph *SourceGraph,
506506
DestFrom = DestFrom->getMergeTarget();
507507
}
508508

509-
for (auto *Defered : SourceReachable->defersTo) {
510-
if (!Defered->isInWorkList) {
511-
WorkList.push_back(Defered);
512-
Defered->isInWorkList = true;
509+
for (auto *Deferred : SourceReachable->defersTo) {
510+
if (!Deferred->isInWorkList) {
511+
WorkList.push_back(Deferred);
512+
Deferred->isInWorkList = true;
513513
}
514514
}
515515
}
@@ -572,7 +572,7 @@ struct CGForDotView {
572572

573573
enum EdgeTypes {
574574
PointsTo,
575-
Defered
575+
Deferred
576576
};
577577

578578
struct Node {
@@ -629,7 +629,7 @@ CGForDotView::CGForDotView(const EscapeAnalysis::ConnectionGraph *CG) :
629629
}
630630
for (auto *Def : OrigNode->defersTo) {
631631
Nd.Children.push_back(Orig2Node[Def]);
632-
Nd.ChildrenTypes.push_back(Defered);
632+
Nd.ChildrenTypes.push_back(Deferred);
633633
}
634634
}
635635
}
@@ -767,7 +767,7 @@ namespace llvm {
767767
unsigned ChildIdx = I - Node->Children.begin();
768768
switch (Node->ChildrenTypes[ChildIdx]) {
769769
case CGForDotView::PointsTo: return "";
770-
case CGForDotView::Defered: return "color=\"gray\"";
770+
case CGForDotView::Deferred: return "color=\"gray\"";
771771
}
772772
}
773773
};
@@ -930,7 +930,7 @@ void EscapeAnalysis::ConnectionGraph::verifyStructure() const {
930930
for (Predecessor Pred : Nd->Preds) {
931931
CGNode *PredNode = Pred.getPointer();
932932
if (Pred.getInt() == EdgeType::Defer) {
933-
assert(PredNode->findDefered(Nd) != PredNode->defersTo.end());
933+
assert(PredNode->findDeferred(Nd) != PredNode->defersTo.end());
934934
} else {
935935
assert(Pred.getInt() == EdgeType::PointsTo);
936936
assert(PredNode->getPointsToEdge() == Nd);

lib/Sema/TypeCheckDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5618,7 +5618,7 @@ bool TypeChecker::isAvailabilitySafeForConformance(
56185618
return true;
56195619

56205620
NominalTypeDecl *conformingDecl = DC->isNominalTypeOrNominalTypeExtensionContext();
5621-
assert(conformingDecl && "Must have conformining declaration");
5621+
assert(conformingDecl && "Must have conforming declaration");
56225622

56235623
// Make sure that any access of the witness through the protocol
56245624
// can only occur when the witness is available. That is, make sure that

stdlib/public/core/Index.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ public protocol _RandomAccessAmbiguity {
350350
extension _RandomAccessAmbiguity {
351351
@warn_unused_result
352352
public func advancedBy(n: Distance) -> Self {
353-
fatalError("advancedBy(n) not implememented")
353+
fatalError("advancedBy(n) not implemented")
354354
}
355355
}
356356

tools/SourceKit/docs/Protocol.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ response for the cursor-info request will have an entry for the module name:
173173
key.modulename: "<module-name>"
174174

175175
Also if there is already a generated-interface document for this module
176-
previously opened, there will be an entry with the "virtual name" assosiated
176+
previously opened, there will be an entry with the "virtual name" associated
177177
with this document (from the previous 'editor.open.interface' request):
178178

179179
key.module_interface_name: "<virtual name for interface document>"

tools/SourceKit/lib/SwiftLang/SwiftCompletion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ bool SwiftToSourceKitCompletionAdapter::handleResult(
450450
llvm::SmallString<64> LogMessage;
451451
llvm::raw_svector_ostream LogMessageOs(LogMessage);
452452

453-
LogMessageOs << "Code cpompletion result with empty name and/or "
453+
LogMessageOs << "Code completion result with empty name and/or "
454454
"description was ignored: \n";
455455
Result->print(LogMessageOs);
456456

0 commit comments

Comments
 (0)