Skip to content

Commit 6fc2efb

Browse files
Merge pull request #9572 from practicalswift/gardening-20170513
[gardening] Remove assert requirement from fixed crashers. Fix spacing. Remove unused variables.
2 parents 51273ff + ba5f818 commit 6fc2efb

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

lib/IDE/APIDigesterData.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ TypeMemberDiffItemSubKind
117117
swift::ide::api::TypeMemberDiffItem::getSubKind() const {
118118
DeclNameViewer OldName = getOldName();
119119
DeclNameViewer NewName = getNewName();
120-
if(!OldName.isFunction()) {
120+
if (!OldName.isFunction()) {
121121
assert(!NewName.isFunction());
122122
return TypeMemberDiffItemSubKind::SimpleReplacement;
123123
}

lib/IRGen/LoadableByAddress.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ static bool containsLargeLoadable(GenericEnvironment *GenericEnv,
107107
currSILFunctionType->getParameters(), Mod)) {
108108
return true;
109109
}
110-
} else if (auto *currSILBlockType =
111-
dyn_cast<SILBlockStorageType>(currCanType.getPointer())) {
110+
} else if (isa<SILBlockStorageType>(currCanType.getPointer())) {
112111
continue;
113112
} else {
114113
switch (param.getConvention()) {
@@ -303,8 +302,7 @@ static SILType getNewSILType(GenericEnvironment *GenericEnv,
303302
return newSILType;
304303
}
305304
CanType currCanType = storageType.getSwiftRValueType();
306-
if (auto *currSILBlockType =
307-
dyn_cast<SILBlockStorageType>(currCanType.getPointer())) {
305+
if (isa<SILBlockStorageType>(currCanType.getPointer())) {
308306
return storageType;
309307
}
310308
if (SILFunctionType *currSILFunctionType =
@@ -693,14 +691,14 @@ void LargeValueVisitor::visitTupleInst(SILInstruction *instr) {
693691

694692
void LargeValueVisitor::visitAllocStackInst(AllocStackInst *instr) {
695693
SILType currSILType = instr->getType().getObjectType();
696-
if (auto *fType = getInnerFunctionType(currSILType)) {
694+
if (getInnerFunctionType(currSILType)) {
697695
pass.allocStackInstsToMod.push_back(instr);
698696
}
699697
}
700698

701699
void LargeValueVisitor::visitPointerToAddressInst(PointerToAddressInst *instr) {
702700
SILType currSILType = instr->getType().getObjectType();
703-
if (auto *fType = getInnerFunctionType(currSILType)) {
701+
if (getInnerFunctionType(currSILType)) {
704702
pass.pointerToAddrkInstsToMod.push_back(instr);
705703
}
706704
}

lib/SILOptimizer/IPO/DeadFunctionElimination.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ class FunctionLivenessComputation {
210210
ensureAliveClassMethod(getMethodInfo(decl, /*witness*/ false),
211211
dyn_cast<FuncDecl>(decl),
212212
clas);
213-
} else if (auto proto =
214-
dyn_cast<ProtocolDecl>(decl->getDeclContext())) {
213+
} else if (isa<ProtocolDecl>(decl->getDeclContext())) {
215214
ensureAliveProtocolMethod(getMethodInfo(decl, /*witness*/ true));
216215
} else {
217216
llvm_unreachable("key path keyed by a non-class, non-protocol method");
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// RUN: %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
2-
// REQUIRES: asserts
32

43
protocol a where #^A^#

validation-test/compiler_crashers_fixed/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
77

88
// RUN: not %target-swift-frontend %s -emit-ir
9-
// REQUIRES: asserts
109
func a{guard let[]=(a||()A

0 commit comments

Comments
 (0)