Skip to content

Commit 15ff133

Browse files
Merge pull request #6648 from practicalswift/fix-warnings
[gardening] Match param names. Add override. Add end-of-namespace comments.
2 parents 982b711 + adc75d6 commit 15ff133

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

lib/IRGen/AllocStackHoisting.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Partition {
8585
/// non-overlapping.
8686
void assignStackLocation(SmallVectorImpl<SILInstruction *> &FunctionExits);
8787
};
88-
} // end anonymous namespace.
88+
} // end anonymous namespace
8989

9090
/// Erases all dealloc_stack users of an alloc_stack
9191
static void eraseDeallocStacks(AllocStackInst *AllocStack) {
@@ -213,7 +213,7 @@ class Liveness {
213213
return false;
214214
}
215215
};
216-
} // end anonymous namespace.
216+
} // end anonymous namespace
217217

218218
namespace {
219219
/// Merge alloc_stack instructions.
@@ -237,7 +237,7 @@ class MergeStackSlots {
237237
/// block.
238238
void mergeSlots();
239239
};
240-
} // end anonymous namespace.
240+
} // end anonymous namespace
241241

242242
MergeStackSlots::MergeStackSlots(SmallVectorImpl<AllocStackInst *> &AllocStacks,
243243
SmallVectorImpl<SILInstruction *> &FuncExits)
@@ -339,7 +339,7 @@ class HoistAllocStack {
339339
/// Move the hoistable alloc_stack instructions to the entry block.
340340
void hoist();
341341
};
342-
}
342+
} // end anonymous namespace
343343

344344
/// Collect generic alloc_stack instructions in the current function can be
345345
/// hoisted.

lib/SILGen/SILGenPoly.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ namespace {
10861086
SGF.B.createInitExistentialAddr(Loc, existentialBuf,
10871087
inputTupleType,
10881088
concreteTL.getLoweredType(),
1089-
/*conformances=*/{});
1089+
/*Conformances=*/{});
10901090

10911091
auto tupleTemp = SGF.useBufferAsTemporary(tupleBuf, concreteTL);
10921092
translateAndImplodeInto(inputOrigType, inputTupleType,
@@ -1859,7 +1859,7 @@ ResultPlanner::planTupleIntoIndirectResult(AbstractionPattern innerOrigType,
18591859
SILValue outerConcreteResultAddr
18601860
= Gen.B.createInitExistentialAddr(Loc, outerResultAddr, innerSubstType,
18611861
Gen.getLoweredType(opaque, innerSubstType),
1862-
/*conformances=*/{});
1862+
/*Conformances=*/{});
18631863

18641864
// Emit into that address.
18651865
planTupleIntoIndirectResult(innerOrigType, innerSubstType,

lib/Sema/InstrumenterSupport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class ErrorFinder : public ASTWalker {
6767
}
6868
bool hadError() { return error; }
6969
};
70-
}
70+
} // end anonymous namespace
7171

7272
void InstrumenterBase::anchor() {}
7373

lib/Sema/PCMacro.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class Instrumenter : InstrumenterBase {
327327
return D;
328328
}
329329

330-
BraceStmt *transformBraceStmt(BraceStmt *BS, bool TopLevel = false) {
330+
BraceStmt *transformBraceStmt(BraceStmt *BS, bool TopLevel = false) override {
331331
ArrayRef<ASTNode> OriginalElements = BS->getElements();
332332
SmallVector<swift::ASTNode, 3> Elements(OriginalElements.begin(),
333333
OriginalElements.end());
@@ -676,7 +676,7 @@ void swift::performPCMacro(SourceFile &SF, TopLevelContext &TLC) {
676676
public:
677677
ExpressionFinder(TopLevelContext &TLC) : TLC(TLC) {}
678678

679-
virtual bool walkToDeclPre(Decl *D) {
679+
bool walkToDeclPre(Decl *D) override {
680680
if (AbstractFunctionDecl *FD = dyn_cast<AbstractFunctionDecl>(D)) {
681681
if (!FD->isImplicit()) {
682682
if (FD->getBody()) {

lib/Sema/PlaygroundTransform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ class Instrumenter : InstrumenterBase {
361361
}
362362
}
363363

364-
BraceStmt *transformBraceStmt(BraceStmt *BS, bool TopLevel = false) {
364+
BraceStmt *transformBraceStmt(BraceStmt *BS, bool TopLevel = false) override {
365365
ArrayRef<ASTNode> OriginalElements = BS->getElements();
366366
typedef SmallVector<swift::ASTNode, 3> ElementVector;
367367
ElementVector Elements(OriginalElements.begin(), OriginalElements.end());

lib/Sema/TypeCheckNameLookup.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ TypeChecker::lookupUnqualifiedType(DeclContext *dc, DeclName name,
222222
options.contains(NameLookupFlags::KnownPrivate),
223223
loc,
224224
/*OnlyTypes=*/true,
225-
/*ProtocolMembers=*/false,
225+
/*AllowProtocolMembers=*/false,
226226
options.contains(NameLookupFlags::IgnoreAccessibility));
227227
for (auto found : lookup.Results)
228228
decls.push_back(cast<TypeDecl>(found.getValueDecl()));
@@ -239,7 +239,7 @@ TypeChecker::lookupUnqualifiedType(DeclContext *dc, DeclName name,
239239
options.contains(NameLookupFlags::KnownPrivate),
240240
loc,
241241
/*OnlyTypes=*/true,
242-
/*ProtocolMembers=*/true,
242+
/*AllowProtocolMembers=*/true,
243243
options.contains(NameLookupFlags::IgnoreAccessibility));
244244

245245
for (auto found : lookup.Results)

0 commit comments

Comments
 (0)