Skip to content

Commit

Permalink
Merge pull request #3431 from practicalswift/minor-syntax-fixes
Browse files Browse the repository at this point in the history
[gardening] Minor syntax cleanups.
  • Loading branch information
gribozavr authored Jul 10, 2016
2 parents 5d2aa7c + 808b539 commit 1f63d98
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions benchmark/single-source/Phonebook.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// for performance measuring.
import TestsUtils

var words=[
var words = [
"James", "John", "Robert", "Michael", "William", "David", "Richard", "Joseph",
"Charles", "Thomas", "Christopher", "Daniel", "Matthew", "Donald", "Anthony",
"Paul", "Mark", "George", "Steven", "Kenneth", "Andrew", "Edward", "Brian",
Expand All @@ -27,7 +27,8 @@ var words=[
"Terry", "Joe", "Sean", "Willie", "Jesse", "Ralph", "Billy", "Austin", "Bruce",
"Christian", "Roy", "Bryan", "Eugene", "Louis", "Harry", "Wayne", "Ethan",
"Jordan", "Russell", "Alan", "Philip", "Randy", "Juan", "Howard", "Vincent",
"Bobby", "Dylan", "Johnny", "Phillip", "Craig"]
"Bobby", "Dylan", "Johnny", "Phillip", "Craig"
]

// This is a phone book record.
struct Record : Comparable {
Expand Down
6 changes: 4 additions & 2 deletions benchmark/utils/DriverUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ struct TestConfig {
var tests = [Test]()

mutating func processArguments() -> TestAction {
let validOptions=["--iter-scale", "--num-samples", "--num-iters",
"--verbose", "--delim", "--run-all", "--list", "--sleep"]
let validOptions = [
"--iter-scale", "--num-samples", "--num-iters",
"--verbose", "--delim", "--run-all", "--list", "--sleep"
]
let maybeBenchArgs: Arguments? = parseArgs(validOptions)
if maybeBenchArgs == nil {
return .Fail("Failed to parse arguments")
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/MiscDiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2839,7 +2839,7 @@ static void checkStmtConditionTrailingClosure(TypeChecker &TC, const Expr *E) {
if (auto TT = argsTy->getAs<TupleType>()) {
assert(TT->getNumElements() != 0 && "Unexpected empty TupleType");
auto closureLabel = TT->getElement(TT->getNumElements() - 1).getName();
if(!closureLabel.empty()) {
if (!closureLabel.empty()) {
replacement += closureLabel.str();
replacement += ": ";
}
Expand Down

0 comments on commit 1f63d98

Please sign in to comment.