Skip to content

[AST/Sema] Eliminate a few unused 'depth' local variables. #7793

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 1 commit into from
Feb 27, 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
1 change: 0 additions & 1 deletion lib/AST/GenericSignatureBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2372,7 +2372,6 @@ void GenericSignatureBuilder::inferRequirements(ParameterList *params,
if (genericParams == nullptr)
return;

unsigned depth = genericParams->getDepth();
for (auto P : *params)
inferRequirements(P->getTypeLoc());
}
Expand Down
4 changes: 0 additions & 4 deletions lib/Sema/TypeCheckGeneric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,6 @@ void TypeChecker::checkGenericParamList(GenericSignatureBuilder *builder,
builder->addGenericParameter(param);
}

unsigned depth = genericParams->getDepth();

// Now, check the inheritance clauses of each parameter.
for (auto param : *genericParams) {
checkInheritanceClause(param, resolver);
Expand Down Expand Up @@ -486,7 +484,6 @@ static bool checkGenericFuncSignature(TypeChecker &tc,
// Infer requirements from it.
if (builder && genericParams &&
fn->getBodyResultTypeLoc().getTypeRepr()) {
unsigned depth = genericParams->getDepth();
builder->inferRequirements(fn->getBodyResultTypeLoc());
}
}
Expand Down Expand Up @@ -823,7 +820,6 @@ static bool checkGenericSubscriptSignature(TypeChecker &tc,
// Infer requirements from it.
if (genericParams && builder &&
subscript->getElementTypeLoc().getTypeRepr()) {
unsigned depth = genericParams->getDepth();
builder->inferRequirements(subscript->getElementTypeLoc());
}

Expand Down