Skip to content

Commit 85f3058

Browse files
committed
Merge pull request #2876 from practicalswift/syntax-cleanups
2 parents 7dc5928 + 57bccc8 commit 85f3058

File tree

13 files changed

+28
-28
lines changed

13 files changed

+28
-28
lines changed

include/swift/SIL/Projection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ class ProjectionTree {
820820
ProjectionTree(SILModule &Mod, SILType BaseTy);
821821
/// Construct an uninitialized projection tree, which can then be
822822
/// initialized by initializeWithExistingTree.
823-
ProjectionTree(SILModule &Mod) : Mod(Mod) {}
823+
ProjectionTree(SILModule &Mod) : Mod(Mod) {}
824824
~ProjectionTree();
825825
ProjectionTree(const ProjectionTree &) = delete;
826826
ProjectionTree(ProjectionTree &&) = default;

include/swift/SILOptimizer/Utils/FunctionSignatureOptUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ struct ArgumentDescriptor {
8282
OwnedToGuaranteed(false),
8383
IsIndirectResult(A->isIndirectResult()),
8484
CalleeRelease(), CalleeReleaseInThrowBlock(),
85-
ProjTree(A->getModule(), A->getType()) {}
85+
ProjTree(A->getModule(), A->getType()) {}
8686

8787
ArgumentDescriptor(const ArgumentDescriptor &) = delete;
8888
ArgumentDescriptor(ArgumentDescriptor &&) = default;

lib/AST/ASTPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ collectNameTypeMap(Type Ty, const DeclContext *DC) {
6868
assert(ParamDecls.size() == Args.size());
6969

7070
// Map type parameter names with their instantiating arguments.
71-
for (unsigned I = 0, N = ParamDecls.size(); I < N; I ++) {
71+
for (unsigned I = 0, N = ParamDecls.size(); I < N; I++) {
7272
(*IdMap)[ParamDecls[I]->getName().str()] = Args[I];
7373
}
7474
} while ((BaseTy = BaseTy->getSuperclass(nullptr)));

lib/IDE/CodeCompletion.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class ClangCommentExtractor : public ConstCommentVisitor<ClangCommentExtractor>
182182
return;
183183
auto &Parent = Parents.back();
184184
for (auto CIT = std::find(Parent->child_begin(), Parent->child_end(), C) + 1;
185-
CIT != Parent->child_end(); CIT ++) {
185+
CIT != Parent->child_end(); CIT++) {
186186
if (auto TC = dyn_cast<TextComment>(*CIT)) {
187187
auto Text = TC->getText();
188188
std::vector<StringRef> Subs;
@@ -751,7 +751,7 @@ void CodeCompletionResult::print(raw_ostream &OS) const {
751751
Prefix.append(KW);
752752
Prefix.append(Sep);
753753
}
754-
for (unsigned I = 0, N = Sep.size(); I < N; ++ I)
754+
for (unsigned I = 0, N = Sep.size(); I < N; ++I)
755755
Prefix.pop_back();
756756
Prefix.append("]");
757757
}
@@ -1413,7 +1413,7 @@ ArchetypeTransformer::ArchetypeTransformer(DeclContext *DC, Type Ty) :
14131413
auto Params = D->getInnermostGenericParamTypes();
14141414
auto Args = BaseTy->getAllGenericArgs(Scrach);
14151415
assert(Params.size() == Args.size());
1416-
for (unsigned I = 0, N = Params.size(); I < N; I ++) {
1416+
for (unsigned I = 0, N = Params.size(); I < N; I++) {
14171417
Map[Params[I]->getCanonicalType()->castTo<GenericTypeParamType>()] = Args[I];
14181418
}
14191419
}

lib/IDE/Formatting.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ class FormatWalker : public SourceEntityWalker {
518518
// Generic type params are siblings to align.
519519
if (auto GPL = AFD->getGenericParams()) {
520520
const auto Params = GPL->getParams();
521-
for (unsigned I = 0, N = Params.size(); I < N; I ++) {
521+
for (unsigned I = 0, N = Params.size(); I < N; I++) {
522522
addPair(Params[I]->getEndLoc(), FindAlignLoc(Params[I]->getStartLoc()),
523523
tok::comma);
524524
}
@@ -556,7 +556,7 @@ class FormatWalker : public SourceEntityWalker {
556556
FoundSibling = LBracketLoc;
557557
NeedExtraIndentation = true;
558558
}*/
559-
for (unsigned I = 0, N = AE->getNumElements(); I < N; I ++) {
559+
for (unsigned I = 0, N = AE->getNumElements(); I < N; I++) {
560560
addPair(AE->getElement(I)->getEndLoc(),
561561
FindAlignLoc(AE->getElement(I)->getStartLoc()), tok::comma);
562562
}
@@ -639,7 +639,7 @@ class FormatWalker : public SourceEntityWalker {
639639
return;
640640
for (auto InValid = Loc.isInvalid(); CurrentTokIt != Tokens.end() &&
641641
(InValid || SM.isBeforeInBuffer(CurrentTokIt->getLoc(), Loc));
642-
CurrentTokIt ++) {
642+
CurrentTokIt++) {
643643
if (CurrentTokIt->getKind() == tok::comment) {
644644
auto StartLine = SM.getLineNumber(CurrentTokIt->getRange().getStart());
645645
auto EndLine = SM.getLineNumber(CurrentTokIt->getRange().getEnd());

lib/IDE/ModuleInterfacePrinting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ void swift::ide::printSubmoduleInterface(
292292
if (InterestingClangModule) {
293293
// Assume all submodules are missing.
294294
for (auto It =InterestingClangModule->submodule_begin();
295-
It != InterestingClangModule->submodule_end(); It ++) {
295+
It != InterestingClangModule->submodule_end(); It++) {
296296
NoImportSubModules.insert(*It);
297297
}
298298
}

lib/Sema/CSApply.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3857,7 +3857,7 @@ shouldApplyAddingLabelFixit(TuplePattern *tuplePattern, TupleType *fromTuple,
38573857
if (curFrom->getElements().size() != n ||
38583858
curTo->getElements().size() != n)
38593859
return false;
3860-
for (unsigned i = 0; i < n; i ++) {
3860+
for (unsigned i = 0; i < n; i++) {
38613861
Pattern* subPat = curPattern->getElement(i).getPattern();
38623862
const TupleTypeElt &subFrom = curFrom->getElement(i);
38633863
const TupleTypeElt &subTo = curTo->getElement(i);

lib/Serialization/ModuleFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ ModuleFile::readGroupTable(ArrayRef<uint64_t> Fields, StringRef BlobData) {
628628
new ModuleFile::GroupNameTable);
629629
auto Data = reinterpret_cast<const uint8_t *>(BlobData.data());
630630
unsigned GroupCount = endian::readNext<uint32_t, little, unaligned>(Data);
631-
for (unsigned I = 0; I < GroupCount; I ++) {
631+
for (unsigned I = 0; I < GroupCount; I++) {
632632
auto RawSize = endian::readNext<uint32_t, little, unaligned>(Data);
633633
auto RawText = StringRef(reinterpret_cast<const char *>(Data), RawSize);
634634
Data += RawSize;

lib/Serialization/Serialization.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3748,7 +3748,7 @@ static void writeDeclCommentTable(
37483748
generator.insert(copyString(USRBuffer.str()),
37493749
{ ED->getBriefComment(), Raw,
37503750
GroupContext.getGroupSequence(ED),
3751-
SourceOrder ++ });
3751+
SourceOrder++ });
37523752
}
37533753

37543754
bool walkToDeclPre(Decl *D) override {
@@ -3795,7 +3795,7 @@ static void writeDeclCommentTable(
37953795
generator.insert(copyString(USRBuffer.str()),
37963796
{ VD->getBriefComment(), Raw,
37973797
GroupContext.getGroupSequence(VD),
3798-
SourceOrder ++ });
3798+
SourceOrder++ });
37993799
return true;
38003800
}
38013801
};

stdlib/public/SDK/Foundation/NSError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public protocol __BridgedNSError : RawRepresentable, ErrorProtocol {
5959
}
6060

6161
// Allow two bridged NSError types to be compared.
62-
public func ==<T: __BridgedNSError>(lhs: T, rhs: T ) -> Bool
62+
public func ==<T: __BridgedNSError>(lhs: T, rhs: T) -> Bool
6363
where T.RawValue: SignedInteger {
6464
return lhs.rawValue.toIntMax() == rhs.rawValue.toIntMax()
6565
}

0 commit comments

Comments
 (0)