Skip to content

[gardening] Fix accidental uses of \t #4847

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
Sep 17, 2016
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
16 changes: 8 additions & 8 deletions docs/ContinuousIntegration.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ We describe each in detail below:

Platform | Comment | Check Status
------------ | ------- | ------------
All supported platforms | @swift-ci Please smoke test | Swift Test Linux Platform (smoke test) <br> Swift Test OS X Platform (smoke test)
All supported platforms | @swift-ci Please smoke test and merge | Swift Test Linux Platform (smoke test) <br> Swift Test OS X Platform (smoke test)
All supported platforms | @swift-ci Please smoke test | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)
All supported platforms | @swift-ci Please smoke test and mere | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)
OS X platform | @swift-ci Please smoke test OS X platform | Swift Test OS X Platform (smoke test)
Linux platform | @swift-ci Please smoke test Linux platform | Swift Test Linux Platform (smoke test)

Expand Down Expand Up @@ -66,14 +66,14 @@ A smoke test on Linux does the following:

Platform | Comment | Check Status
------------ | ------- | ------------
All supported platforms | @swift-ci Please test | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)<br>Swift Test Linux Platform<br>Swift Test OS X Platform<br>
All supported platforms | @swift-ci Please clean test | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)<br>Swift Test Linux Platform<br>Swift Test OS X Platform<br>
All supported platforms | @swift-ci Please test and merge | Swift Test Linux Platform (smoke test) <br> Swift Test OS X Platform (smoke test)<br> Swift Test Linux Platform <br>Swift Test OS X Platform
OS X platform | @swift-ci Please test OS X platform | Swift Test OS X Platform (smoke test)<br>Swift Test OS X Platform
All supported platforms | @swift-ci Please test | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)<br>Swift Test Linux Platform<br>Swift Test OS X Platform<br>
All supported platforms | @swift-ci Please clean test | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)<br>Swift Test Linux Platform<br>Swift Test OS X Platform<br>
All supported platforms | @swift-ci Please test and merge | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)<br> Swift Test Linux Platform <br>Swift Test OS X Platform
OS X platform | @swift-ci Please test OS X platform | Swift Test OS X Platform (smoke test)<br>Swift Test OS X Platform
OS X platform | @swift-ci Please clean test OS X platform | Swift Test OS X Platform (smoke test)<br>Swift Test OS X Platform
OS X platform | @swift-ci Please benchmark | Swift Benchmark on OS X Platform
Linux platform | @swift-ci Please test Linux platform | Swift Test Linux Platform (smoke test) <br> Swift Test Linux Platform
Linux platform | @swift-ci Please clean test Linux platform | Swift Test Linux Platform (smoke test) <br> Swift Test Linux Platform
Linux platform | @swift-ci Please test Linux platform | Swift Test Linux Platform (smoke test)<br>Swift Test Linux Platform
Linux platform | @swift-ci Please clean test Linux platform | Swift Test Linux Platform (smoke test)<br>Swift Test Linux Platform

The core principles of validation testing is that:

Expand Down
23 changes: 11 additions & 12 deletions lib/SILGen/RValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,16 +560,15 @@ RValue RValue::extractElement(unsigned n) && {
assert(isComplete() && "rvalue is not complete");

CanTupleType tupleTy = dyn_cast<TupleType>(type);
if (!tupleTy) {
assert(n == 0);
if (!tupleTy) {
assert(n == 0);
unsigned to = getRValueSize(type);
assert(to == values.size());
RValue element({llvm::makeArrayRef(values).slice(0, to), type});
makeUsed();
return element;
assert(to == values.size());
RValue element({llvm::makeArrayRef(values).slice(0, to), type});
makeUsed();
return element;
}


auto range = getElementRange(tupleTy, n);
unsigned from = range.first, to = range.second;

Expand All @@ -583,12 +582,12 @@ void RValue::extractElements(SmallVectorImpl<RValue> &elements) && {
assert(isComplete() && "rvalue is not complete");

CanTupleType tupleTy = dyn_cast<TupleType>(type);
if (!tupleTy) {
if (!tupleTy) {
unsigned to = getRValueSize(type);
assert(to == values.size());
elements.push_back({llvm::makeArrayRef(values).slice(0, to), type});
makeUsed();
return;
assert(to == values.size());
elements.push_back({llvm::makeArrayRef(values).slice(0, to), type});
makeUsed();
return;
}

unsigned from = 0;
Expand Down
38 changes: 19 additions & 19 deletions lib/SILGen/SILGenApply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2976,25 +2976,25 @@ namespace {
if (arg.isRValue()) {
if (CanTupleType substArgType =
dyn_cast<TupleType>(arg.getSubstType())) {
// The original type isn't necessarily a tuple.
assert(origParamType.matchesTuple(substArgType));

auto loc = arg.getKnownRValueLocation();
SmallVector<RValue, 4> elts;
std::move(arg).asKnownRValue().extractElements(elts);
for (auto i : indices(substArgType.getElementTypes())) {
emit({ loc, std::move(elts[i]) },
origParamType.getTupleElementType(i));
}
return;
}

auto loc = arg.getKnownRValueLocation();
SmallVector<RValue, 1> elts;
std::move(arg).asKnownRValue().extractElements(elts);
emit({ loc, std::move(elts[0]) },
origParamType.getTupleElementType(0));
return;
// The original type isn't necessarily a tuple.
assert(origParamType.matchesTuple(substArgType));

auto loc = arg.getKnownRValueLocation();
SmallVector<RValue, 4> elts;
std::move(arg).asKnownRValue().extractElements(elts);
for (auto i : indices(substArgType.getElementTypes())) {
emit({ loc, std::move(elts[i]) },
origParamType.getTupleElementType(i));
}
return;
}

auto loc = arg.getKnownRValueLocation();
SmallVector<RValue, 1> elts;
std::move(arg).asKnownRValue().extractElements(elts);
emit({ loc, std::move(elts[0]) },
origParamType.getTupleElementType(0));
return;
}

// Otherwise, we're working with an expression.
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Analysis/EpilogueARCAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ bool EpilogueARCContext::convergeDataflow() {
BBSetOut = EpilogueARCBlockStates[*Iter]->BBSetIn;
Iter = std::next(Iter);
for (auto E = B->succ_end(); Iter != E; ++Iter) {
BBSetOut &= EpilogueARCBlockStates[*Iter]->BBSetIn;
BBSetOut &= EpilogueARCBlockStates[*Iter]->BBSetIn;
}
} else if (isExitBlock(B)) {
// We set the BBSetOut for exit blocks.
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Utils/Local.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2685,7 +2685,7 @@ bool swift::calleesAreStaticallyKnowable(SILModule &M, SILDeclRef Decl) {
case Accessibility::Public:
if (auto ctor = dyn_cast<ConstructorDecl>(AFD)) {
if (ctor->isRequired())
return false;
return false;
}
SWIFT_FALLTHROUGH;
case Accessibility::Internal:
Expand Down
4 changes: 2 additions & 2 deletions lib/Sema/DerivedConformanceRawRepresentable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static void deriveBodyRawRepresentable_raw(AbstractFunctionDecl *toRawDecl) {

for (auto elt : enumDecl->getAllElements()) {
assert(elt->getTypeCheckedRawValueExpr() &&
"Enum element has no literal - missing a call to checkEnumRawValues()");
"Enum element has no literal - missing a call to checkEnumRawValues()");
assert(elt->getTypeCheckedRawValueExpr()->getType()->isEqual(rawTy));
}

Expand Down Expand Up @@ -188,7 +188,7 @@ deriveBodyRawRepresentable_init(AbstractFunctionDecl *initDecl) {

for (auto elt : enumDecl->getAllElements()) {
assert(elt->getTypeCheckedRawValueExpr() &&
"Enum element has no literal - missing a call to checkEnumRawValues()");
"Enum element has no literal - missing a call to checkEnumRawValues()");
assert(elt->getTypeCheckedRawValueExpr()->getType()->isEqual(rawTy));
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/ITCDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void IterativeTypeChecker::processInheritedProtocols(
if (inheritedProtocol == protocol ||
inheritedProtocol->inheritsFrom(protocol)) {
if (!diagnosedCircularity &&
!protocol->isInheritedProtocolsValid()) {
!protocol->isInheritedProtocolsValid()) {
diagnose(protocol,
diag::circular_protocol_def, protocol->getName().str())
.fixItRemove(inherited.getSourceRange());
Expand Down
4 changes: 2 additions & 2 deletions lib/Sema/TypeCheckProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4019,8 +4019,8 @@ static void diagnoseConformanceFailure(TypeChecker &TC, Type T,
// Special case: for enums with a raw type, explain that the failing
// conformance to RawRepresentable was inferred.
if (auto enumDecl = T->getEnumOrBoundGenericEnum()) {
if (Proto->isSpecificProtocol(KnownProtocolKind::RawRepresentable) &&
enumDecl->derivesProtocolConformance(Proto) && enumDecl->hasRawType()) {
if (Proto->isSpecificProtocol(KnownProtocolKind::RawRepresentable) &&
enumDecl->derivesProtocolConformance(Proto) && enumDecl->hasRawType()) {

TC.diagnose(enumDecl->getInherited()[0].getSourceRange().Start,
diag::enum_raw_type_nonconforming_and_nonsynthable,
Expand Down
8 changes: 4 additions & 4 deletions stdlib/public/SDK/Foundation/DataThunks.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ void __NSDataInvokeDeallocatorFree(void *mem, NSUInteger length) {
static int __NSFileProtectionClassForOptions(NSUInteger options) {
int result;
switch (options & NSDataWritingFileProtectionMask) {
case NSDataWritingFileProtectionComplete: // Class A
case NSDataWritingFileProtectionComplete: // Class A
result = 1;
break;
case NSDataWritingFileProtectionCompleteUnlessOpen: // Class B
case NSDataWritingFileProtectionCompleteUnlessOpen: // Class B
result = 2;
break;
case NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication: // Class C
case NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication: // Class C
result = 3;
break;
case NSDataWritingFileProtectionNone: // Class D
case NSDataWritingFileProtectionNone: // Class D
result = 4;
break;
default:
Expand Down
Loading