Skip to content

Commit 27eabd4

Browse files
Merge pull request swiftlang#8498 from practicalswift/gardening-20170403
[gardening] Fix typos. Fix headers. Python cleanups.
2 parents 7684e73 + 77ab316 commit 27eabd4

33 files changed

+35
-36
lines changed

.flake8

+2-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ filename = *.py,
1919
./utils/line-directive,
2020
./utils/swift_build_support/tests/mock-distcc,
2121
./docs/scripts/ns-html2rst,
22-
.utils/PathSanitizingFileCheck,
23-
./utils/python-lint,
22+
./utils/PathSanitizingFileCheck,
2423
./utils/recursive-lipo,
2524
./utils/round-trip-syntax-test,
2625
./utils/rth,
@@ -29,4 +28,4 @@ filename = *.py,
2928
./utils/submit-benchmark-results,
3029
./utils/update-checkout,
3130
./utils/viewcfg,
32-
./utils/symbolicate-linux-fatal
31+
./utils/symbolicate-linux-fatal,

benchmark/scripts/Benchmark_RuntimeLeaksRunner.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class LeaksRunnerBenchmarkDriver(perf_test_driver.BenchmarkDriver):
9494
raise RuntimeError("Expected one line of output")
9595
if result != 0:
9696
raise RuntimeError("Process segfaulted")
97-
except:
97+
except Exception:
9898
sys.stderr.write("Child Process Failed! (%s,%s)\n" % (
9999
data['path'], data['test_name']))
100100
sys.stderr.flush()
@@ -110,7 +110,7 @@ class LeaksRunnerBenchmarkDriver(perf_test_driver.BenchmarkDriver):
110110

111111
total_count = d['objc_count'] + d['swift_count']
112112
return total_count
113-
except:
113+
except Exception:
114114
tmp = (data['path'], data['test_name'])
115115
sys.stderr.write("Failed parse output! (%s,%s)\n" % tmp)
116116
sys.stderr.flush()

benchmark/single-source/CString.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- CString.swift -------------------------------------------------===//
1+
//===--- CString.swift ----------------------------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

benchmark/single-source/StringEdits.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- StringEdits.swift-------------------------------------------------===//
1+
//===--- StringEdits.swift ------------------------------------*- swift -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

benchmark/single-source/StringMatch.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- StringMatch.swift-------------------------------------------------===//
1+
//===--- StringMatch.swift ------------------------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

benchmark/single-source/Suffix.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- Suffix.swift ---------------------------------------------------===//
1+
//===--- Suffix.swift -----------------------------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

include/swift/Demangling/StandardTypesMangling.def

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- StandardTypesMangling.def - Mangling Metaprogramming ----*- C++ -*-===//
1+
//===--- StandardTypesMangling.def - Mangling Metaprogramming ---*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

include/swift/SIL/SILVTableVisitor.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- SILVTableVisitor.h - Class vtable visitor -------------*- C++ -*-===//
1+
//===--- SILVTableVisitor.h - Class vtable visitor --------------*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

include/swift/TBDGen/TBDGen.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- TBDGenPublic.h - Public interface to TBDGen ------------*- C++ -*-===//
1+
//===--- TBDGen.h - Public interface to TBDGen ------------------*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

lib/AST/ModuleLoader.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift.org open source project
44
//
5-
// Copyright (c) 2017 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See https://swift.org/LICENSE.txt for license information

lib/FrontendTool/TBD.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- Tbd.h -- generates and validates TBD files -----------------------===//
1+
//===--- TBD.h -- generates and validates TBD files -------------*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

lib/SILGen/ArgumentScope.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- ArgumentScope.h --------------------------------------------------===//
1+
//===--- ArgumentScope.h ----------------------------------------*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

lib/SILGen/Callee.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- Callee.h ---------------------------------------------------------===//
1+
//===--- Callee.h -----------------------------------------------*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

lib/SILGen/ResultPlan.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- ResultPlan.h -----------------------------------------------------===//
1+
//===--- ResultPlan.h -------------------------------------------*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

lib/SILOptimizer/Transforms/ArrayElementValuePropagation.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class ArrayAllocation {
8282
SILValue Replacement;
8383
};
8484

85-
/// Specifies the set of elements with which a append-contentof call can be
85+
/// Specifies the set of elements with which an append-contentof call can be
8686
/// replaced.
8787
struct AppendContentOfReplacement {
8888
ApplyInst *AppendContentOfCall;

stdlib/public/SwiftShims/CFCharacterSetShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- CFCharacterSetShims.h - CoreFoundation declarations for CF hashing functions ------===//
1+
//===--- CFCharacterSetShims.h - Declarations for CF hashing functions ----===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/CFHashingShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- CFHashingShims.h - CoreFoundation declarations for CF hashing functions ------===//
1+
//===--- CFHashingShims.h - Declarations for CF hashing functions ---------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/CoreFoundationOverlayShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===----------------------------------------------------------------------===//
1+
//===------------------------------------------------------------*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/FoundationShimSupport.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- FoundationShimSupport.h - Helper macros for Foundation overlay ------===//
1+
//===--- FoundationShimSupport.h - Helper macros for Foundation overlay ---===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/NSCalendarShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- NSCalendarShims.h - Foundation declarations for Calendar overlay ------===//
1+
//===--- NSCalendarShims.h - Foundation declarations for Calendar overlay -===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/NSCoderShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- NSCoderShims.h - Foundation declarations for NSCoder overlay ------===//
1+
//===--- NSCoderShims.h - Foundation declarations for NSCoder overlay -----===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/NSDataShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- NSDataShims.h - Foundation declarations for Data overlay ------===//
1+
//===--- NSDataShims.h - Foundation declarations for Data overlay ---------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/NSDictionaryShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- NSDictionaryShims.h - Foundation declarations for Dictionary overlay ------===//
1+
//===--- NSDictionaryShims.h - Foundation decl. for Dictionary overlay ----===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/NSErrorShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- NSErrorShims.h - Foundation declarations for NSError overlay ------===//
1+
//===--- NSErrorShims.h - Foundation declarations for NSError overlay -----===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/NSFileManagerShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- NSFileManagerShims.h - Foundation declarations for FileManager overlay ------===//
1+
//===--- NSFileManagerShims.h - Foundation decl. for FileManager overlay --===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/NSIndexSetShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- NSIndexSetShims.h - Foundation declarations for IndexSet overlay ------===//
1+
//===--- NSIndexSetShims.h - Foundation declarations for IndexSet overlay -===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/NSKeyedArchiverShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- NSKeyedArchiverShims.h - Foundation declarations for NSKeyedArchiver overlay ------===//
1+
//===--- NSKeyedArchiverShims.h - Found. decl. for NSKeyedArchiver overlay ===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/NSLocaleShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- NSLocaleShims.h - Foundation declarations for Locale overlay ------===//
1+
//===--- NSLocaleShims.h - Foundation declarations for Locale overlay -----===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/NSTimeZoneShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- NSTimeZoneShims.h - Foundation declarations for TimeZone overlay ------===//
1+
//===--- NSTimeZoneShims.h - Foundation declarations for TimeZone overlay -===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

stdlib/public/SwiftShims/NSUndoManagerShims.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- NSUndoManagerShims.h - Foundation declarations for NSUndoManager overlay ------===//
1+
//===--- NSUndoManagerShims.h - Foundation decl. for NSUndoManager overlay ===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

test/SILOptimizer/capture_promotion_generic_context_ownership.sil

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ struct R<T> {
7878
}
7979

8080
// Check that the capture promotion took place and the function now
81-
// take argument of a type E<(R<T>) -> Builtin.Int32>, which used
81+
// take argument of a type E<(R<T>) -> Builtin.Int32>, which used
8282
// to be a slot inside a box.
8383
// CHECK-LABEL: sil @_T023generic_promotable_box2Tf2nni_n : $@convention(thin) <T> (@in R<T>, @in Builtin.Int32, @owned E<(R<T>) -> Builtin.Int32>) -> ()
8484
// CHECK: bb0([[ARG0:%.*]] : @trivial $*R<T>, [[ARG1:%.*]] : @trivial $*Builtin.Int32, [[ARG2:%.*]] : @owned $E<(R<T>) -> Builtin.Int32>):

utils/update_checkout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def main():
430430
if args.reset_to_remote and not args.scheme:
431431
print("update-checkout usage error: --reset-to-remote must specify "
432432
"--scheme=foo")
433-
exit(1)
433+
sys.exit(1)
434434

435435
clone = args.clone
436436
clone_with_ssh = args.clone_with_ssh

validation-test/compiler_crashers/28726-nominaltypedecl-hasfixedlayout.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This source file is part of the Swift.org open source project
2-
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
2+
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
33
// Licensed under Apache License v2.0 with Runtime Library Exception
44
//
55
// See https://swift.org/LICENSE.txt for license information

0 commit comments

Comments
 (0)