Skip to content

[gardening] Match param names. Add override. Add end-of-namespace comments. #6648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/IRGen/AllocStackHoisting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Partition {
/// non-overlapping.
void assignStackLocation(SmallVectorImpl<SILInstruction *> &FunctionExits);
};
} // end anonymous namespace.
} // end anonymous namespace

/// Erases all dealloc_stack users of an alloc_stack
static void eraseDeallocStacks(AllocStackInst *AllocStack) {
Expand Down Expand Up @@ -213,7 +213,7 @@ class Liveness {
return false;
}
};
} // end anonymous namespace.
} // end anonymous namespace

namespace {
/// Merge alloc_stack instructions.
Expand All @@ -237,7 +237,7 @@ class MergeStackSlots {
/// block.
void mergeSlots();
};
} // end anonymous namespace.
} // end anonymous namespace

MergeStackSlots::MergeStackSlots(SmallVectorImpl<AllocStackInst *> &AllocStacks,
SmallVectorImpl<SILInstruction *> &FuncExits)
Expand Down Expand Up @@ -339,7 +339,7 @@ class HoistAllocStack {
/// Move the hoistable alloc_stack instructions to the entry block.
void hoist();
};
}
} // end anonymous namespace

/// Collect generic alloc_stack instructions in the current function can be
/// hoisted.
Expand Down
4 changes: 2 additions & 2 deletions lib/SILGen/SILGenPoly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ namespace {
SGF.B.createInitExistentialAddr(Loc, existentialBuf,
inputTupleType,
concreteTL.getLoweredType(),
/*conformances=*/{});
/*Conformances=*/{});

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

// Emit into that address.
planTupleIntoIndirectResult(innerOrigType, innerSubstType,
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/InstrumenterSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ErrorFinder : public ASTWalker {
}
bool hadError() { return error; }
};
}
} // end anonymous namespace

void InstrumenterBase::anchor() {}

Expand Down
4 changes: 2 additions & 2 deletions lib/Sema/PCMacro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class Instrumenter : InstrumenterBase {
return D;
}

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

virtual bool walkToDeclPre(Decl *D) {
bool walkToDeclPre(Decl *D) override {
if (AbstractFunctionDecl *FD = dyn_cast<AbstractFunctionDecl>(D)) {
if (!FD->isImplicit()) {
if (FD->getBody()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/PlaygroundTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ class Instrumenter : InstrumenterBase {
}
}

BraceStmt *transformBraceStmt(BraceStmt *BS, bool TopLevel = false) {
BraceStmt *transformBraceStmt(BraceStmt *BS, bool TopLevel = false) override {
ArrayRef<ASTNode> OriginalElements = BS->getElements();
typedef SmallVector<swift::ASTNode, 3> ElementVector;
ElementVector Elements(OriginalElements.begin(), OriginalElements.end());
Expand Down
4 changes: 2 additions & 2 deletions lib/Sema/TypeCheckNameLookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ TypeChecker::lookupUnqualifiedType(DeclContext *dc, DeclName name,
options.contains(NameLookupFlags::KnownPrivate),
loc,
/*OnlyTypes=*/true,
/*ProtocolMembers=*/false,
/*AllowProtocolMembers=*/false,
options.contains(NameLookupFlags::IgnoreAccessibility));
for (auto found : lookup.Results)
decls.push_back(cast<TypeDecl>(found.getValueDecl()));
Expand All @@ -239,7 +239,7 @@ TypeChecker::lookupUnqualifiedType(DeclContext *dc, DeclName name,
options.contains(NameLookupFlags::KnownPrivate),
loc,
/*OnlyTypes=*/true,
/*ProtocolMembers=*/true,
/*AllowProtocolMembers=*/true,
options.contains(NameLookupFlags::IgnoreAccessibility));

for (auto found : lookup.Results)
Expand Down