Commit Graph

1089 Commits

Author SHA1 Message Date
Max Moiseev
644ee19b60 [stdlibunittest] Correctly handling the case when no output is captured for a crash.
If we expect to see an empty string in the output after the crash, it
would fail in case output is empty.
2017-02-02 09:44:28 -08:00
Max Moiseev
d128ed42b0 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-19 14:16:32 -08:00
Han Sangjin
a8dec7fa43 [stdlib] Fixed for Cygwin
- CYGWIN symbol is used to distinguish Cygwin environment from other OS
  and other environment in Windows.
- Added windows and windowsCygnus to OSVersion in StdlibUnittest
2017-01-17 02:31:16 +09:00
Michael Gottesman
2b98e46718 Merge pull request #6711 from moiseev/unsafebitcast
[stdlib] Eliminating some 'unsafeBitcast' related warnings
2017-01-11 22:41:39 -08:00
Matthew Carroll
0e09bbbb83 [DiagnosticsQoI] SR-3359: Add a fix-it to remove @discardableResult on functions that return Void or Never (#6681)
This commit adds a fix-it to remove @discardableResult on functions that return Void or Never. The fix-it is at the warning level. A test was added to verify that the fix-it removes the @discardableResult. This issue was reported in SR-3359:
https://bugs.swift.org/browse/SR-3359

Changes:
TypeCheckAttr.cpp: implemented AttributeChecker::visitDiscardableResultAttr to add a fix-it to remove @discardableResult on functions returning Void or Never.

DiagnosticsSema.def: Added a warning with a diagnostic message.

LoggingWrappers.swift.gyb, HashedCollections.swift.gyb: Removed @discardableResult on functions returning Void.

fixits-apply-all.swift, fixits-apply-all.swift.result: Added tests to verify that @discardableResult is removed from functions returning Void or Never.
2017-01-11 15:12:36 -08:00
Max Moiseev
fa7368ad7d Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-11 14:37:01 -08:00
Max Moiseev
44f0cb9daf Fix the force unwrapping of a nil pointer 2017-01-11 10:22:01 -08:00
Max Moiseev
195691523f [stdlib] Eliminating some 'unsafeBitcast' related warnings 2017-01-10 12:36:22 -08:00
swift-ci
294359bd69 Merge pull request #4804 from kstaring/master 2017-01-10 00:01:46 -08:00
Max Moiseev
aecccc7e48 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-09 17:38:04 -08:00
Ben Cohen
578a52627a Merge branch 'master' into se-147 2017-01-07 13:19:15 -08:00
Ben Cohen
3bdada1773 Merge pull request #6506 from airspeedswift/im-not-warning-you-again
[stdlib] Squash various warnings
2017-01-06 16:51:06 -08:00
Max Moiseev
27889c6376 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-06 15:54:44 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Ben Cohen
465f243943 Move += operator for append(contentsOf:) up to RangeReplaceableCollection 2017-01-05 11:59:49 -08:00
Ben Cohen
fefc2e40df Migrate _copyContents to be called from UnsafeMutableBufferPointer with checks for overrun. 2017-01-05 11:59:49 -08:00
Ben Cohen
4dc5eacef5 Merge branch 'master' into im-not-warning-you-again 2017-01-05 10:11:48 -08:00
JP Simard
65688bdc39 [gardening] replace unused closure parameters with '_' in stdlib source (#6522)
* replace unused closure parameters with '_' in stdlib source

* fold some _ closure arguments into line above

* fold more _ closure arguments into line above
2017-01-03 20:10:41 -07:00
Robert Widmann
fca7b66b7c Merge pull request #6521 from jpsim/jp-void-return
[gardening] prefer '-> Void' over '-> ()' in stdlib source
2017-01-03 20:10:13 -07:00
JP Simard
7301b79342 remove superfluous parentheses in control statements in stdlib source
since this appears to be the convention followed elsewhere in the code base.
2016-12-31 18:40:15 -08:00
JP Simard
ea5b665afa prefer '-> Void' over '-> ()'
Apple and the Swift community has settled on this style:
https://devforums.apple.com/message/1133616#1133616

> FWIW, we've recently decided to standardize on () -> Void
> (generally, () for parameters and Void for return types) across all of our
> documentation.
2016-12-31 17:55:19 -08:00
ben-cohen
c7785533a1 add FIXME for default: warning 2016-12-29 13:20:59 -08:00
ben-cohen
adf56d1435 supress function-arg-before-defaulted-arg warning 2016-12-29 10:49:14 -08:00
ben-cohen
ce0d713cd6 fixed where clauses, Optional-as-Any and unused vars 2016-12-29 07:58:12 -08:00
Max Moiseev
3276aa5bcf Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-12-19 13:15:50 -08:00
Saleem Abdulrasool
a367034193 stdlib: use _pipe on windows instead of pipe
Use the ucrt.io module's `_pipe` to provide a wrapper over the unix
pipe(2) function.  Based on the work of Hugh Bellamy!
2016-12-17 16:39:08 -08:00
Saleem Abdulrasool
15a24c1117 stdlib: include Glibc on cygwin
cygwin uses glibc, so we should use the glibc module when working with
cygwin.
2016-12-17 16:38:34 -08:00
Max Moiseev
61b923f396 Using init(extendingOrTruncating:) instead of a deprecated init(truncatingBitPattern:) 2016-12-15 14:53:31 -08:00
Max Moiseev
7afd9bbdef Making StdlibUnittest compile in absense of + on Strideable 2016-12-02 15:21:51 -08:00
Max Moiseev
3059b3cdd1 Merge branch 'master' into new-integer-protocols 2016-11-30 10:45:10 -08:00
Max Moiseev
70b2343626 Merge branch 'master' into new-integer-protocols 2016-11-28 15:25:01 -08:00
practicalswift
5bc293cc09 [gardening] Add missing licensing headers. 2016-11-28 21:40:06 +01:00
Dave Abrahams
1f19884c01 Assertion failures from StdlibUnittest dump their descriptions 2016-11-23 02:14:39 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Max Moiseev
c0d624f6e2 Minor improvements 2016-11-18 18:56:26 -08:00
K Staring
6a121fb6e3 Merge branch 'master' of https://github.com/apple/swift 2016-11-17 21:13:04 +01:00
Max Moiseev
92813be403 Merge branch 'master' into new-integer-protocols 2016-11-11 16:14:57 -08:00
practicalswift
17503b0d85 [gardening] Use American English. 2016-11-06 10:12:04 +01:00
Max Moiseev
76e0a99a37 Merge branch 'master' into new-integer-protocols 2016-10-31 09:29:19 -07:00
K Staring
536c1ac6ce Merge branch 'master' of https://github.com/apple/swift 2016-10-31 07:10:16 +01:00
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
K Staring
197b64ff70 re-instate newline? 2016-10-25 21:09:30 +02:00
K Staring
07166c0008 revert outcommented code-- the code was outcommented due to the pthread wrappers not compiling, but the wrappers compile now thanks to @tinysun212's suggestions 2016-10-21 22:19:54 +02:00
K Staring
8bda672c70 Merge branch 'master' of https://github.com/apple/swift 2016-10-15 18:36:36 +02:00
Max Moiseev
9428c826bd Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-10-10 14:07:28 -07:00
Brian Gesiak
c42d0d29b6 [stdlib] Only add Apple reflection test targets
When building on a macOS host, and when `SWIFT_INCLUDE_TESTS` is specified,
the `swiftSwiftReflectionTest` target is added to all platforms.
However, this target has a dependency upon Foundation, which is not
available on non-Apple platforms.

Use `add_swift_library`'s `TARGET_SDKS` parameter and other gating
logic to ensure the target is only added for platforms that actually
have Darwin available.
2016-10-07 15:41:31 -04:00
Ben Cohen
fe4186b0b9 Supress various warnings in StdlibUnittest.swift.gyb 2016-10-06 16:14:26 -07:00
Ben Cohen
24dc2af4a9 supress unused loop counter warning (#5134) 2016-10-05 17:02:34 -07:00
K Staring
69085ae4eb Merge branch 'master' of https://github.com/apple/swift 2016-09-29 07:24:25 +02:00
K Staring
47b4c7ee78 fixed the pthread compilation errors by following Sangjin Han's advice,
see also Han's PR:  https://github.com/apple/swift/pull/3886/files#diff-99fd89ad44c4466de8ad6b8aab9c207d
2016-09-29 07:12:15 +02:00