Skip to content

Commit 76349a0

Browse files
committed
Squash some unused variable warnings
1 parent 1d62567 commit 76349a0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/IDE/CodeCompletion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4024,7 +4024,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
40244024
}
40254025

40264026
return getPositionInTupleExpr(DC, CCExpr, tuple, Position, HasName);
4027-
} else if (auto *paren = dyn_cast<ParenExpr>(CallE->getArg())) {
4027+
} else if (isa<ParenExpr>(CallE->getArg())) {
40284028
HasName = false;
40294029
Position = 0;
40304030
return true;

lib/IRGen/LoadableByAddress.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static bool containsFunctionSignature(GenericEnvironment *genEnv,
123123
if (auto optionalObject = objectType.getOptionalObjectType()) {
124124
objectType = optionalObject;
125125
}
126-
if (auto fnType = objectType.getAs<SILFunctionType>()) {
126+
if (objectType.is<SILFunctionType>()) {
127127
return true;
128128
}
129129
}

lib/SIL/InstructionUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ FindClosureResult swift::findClosureForAppliedArg(SILValue V) {
537537
if (auto *bbi = dyn_cast<BeginBorrowInst>(V))
538538
V = bbi->getOperand();
539539

540-
if (auto optionalObjTy = V->getType().getOptionalObjectType())
540+
if (V->getType().getOptionalObjectType())
541541
V = cast<EnumInst>(V)->getOperand();
542542

543543
auto fnType = V->getType().getAs<SILFunctionType>();

lib/SILOptimizer/Mandatory/DiagnoseStaticExclusivity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ static void checkNoEscapePartialApply(PartialApplyInst *PAI) {
10411041
uses.append(EI->getUses().begin(), EI->getUses().end());
10421042
continue;
10431043
}
1044-
if (auto apply = isa<ApplySite>(user)) {
1044+
if (isa<ApplySite>(user)) {
10451045
SILValue arg = oper->get();
10461046
auto ArgumentFnType = getSILFunctionTypeForValue(arg);
10471047
if (ArgumentFnType && ArgumentFnType->isNoEscape()) {

0 commit comments

Comments
 (0)