Skip to content

[gardening] Remove assert requirement from fixed crashers. Fix spacing. Remove unused variables. #9572

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
May 15, 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
2 changes: 1 addition & 1 deletion lib/IDE/APIDigesterData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ TypeMemberDiffItemSubKind
swift::ide::api::TypeMemberDiffItem::getSubKind() const {
DeclNameViewer OldName = getOldName();
DeclNameViewer NewName = getNewName();
if(!OldName.isFunction()) {
if (!OldName.isFunction()) {
assert(!NewName.isFunction());
return TypeMemberDiffItemSubKind::SimpleReplacement;
}
Expand Down
10 changes: 4 additions & 6 deletions lib/IRGen/LoadableByAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ static bool containsLargeLoadable(GenericEnvironment *GenericEnv,
currSILFunctionType->getParameters(), Mod)) {
return true;
}
} else if (auto *currSILBlockType =
dyn_cast<SILBlockStorageType>(currCanType.getPointer())) {
} else if (isa<SILBlockStorageType>(currCanType.getPointer())) {
continue;
} else {
switch (param.getConvention()) {
Expand Down Expand Up @@ -303,8 +302,7 @@ static SILType getNewSILType(GenericEnvironment *GenericEnv,
return newSILType;
}
CanType currCanType = storageType.getSwiftRValueType();
if (auto *currSILBlockType =
dyn_cast<SILBlockStorageType>(currCanType.getPointer())) {
if (isa<SILBlockStorageType>(currCanType.getPointer())) {
return storageType;
}
if (SILFunctionType *currSILFunctionType =
Expand Down Expand Up @@ -693,14 +691,14 @@ void LargeValueVisitor::visitTupleInst(SILInstruction *instr) {

void LargeValueVisitor::visitAllocStackInst(AllocStackInst *instr) {
SILType currSILType = instr->getType().getObjectType();
if (auto *fType = getInnerFunctionType(currSILType)) {
if (getInnerFunctionType(currSILType)) {
pass.allocStackInstsToMod.push_back(instr);
}
}

void LargeValueVisitor::visitPointerToAddressInst(PointerToAddressInst *instr) {
SILType currSILType = instr->getType().getObjectType();
if (auto *fType = getInnerFunctionType(currSILType)) {
if (getInnerFunctionType(currSILType)) {
pass.pointerToAddrkInstsToMod.push_back(instr);
}
}
Expand Down
3 changes: 1 addition & 2 deletions lib/SILOptimizer/IPO/DeadFunctionElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ class FunctionLivenessComputation {
ensureAliveClassMethod(getMethodInfo(decl, /*witness*/ false),
dyn_cast<FuncDecl>(decl),
clas);
} else if (auto proto =
dyn_cast<ProtocolDecl>(decl->getDeclContext())) {
} else if (isa<ProtocolDecl>(decl->getDeclContext())) {
ensureAliveProtocolMethod(getMethodInfo(decl, /*witness*/ true));
} else {
llvm_unreachable("key path keyed by a non-class, non-protocol method");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// RUN: %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
// REQUIRES: asserts

protocol a where #^A^#
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors

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