Commit Graph

7628 Commits

Author SHA1 Message Date
Doug Gregor
e855ae8f58 Clang importer: only consider imported initializers when filtering out duplicates.
Fixes rdar://problem/18500201 and 16 of the crashes in the crash suite.

Swift SVN r24982
2015-02-05 00:07:58 +00:00
Dmitri Hrybenko
de14227634 validation-test: annotate test that started hitting an assertion
Swift SVN r24979
2015-02-04 23:41:59 +00:00
Dmitri Hrybenko
f09b4f3a81 validation-test: annotate tests that don't crash anymore
Swift SVN r24978
2015-02-04 22:55:41 +00:00
Dmitri Hrybenko
e4b1cbeb64 stdlib: remove .null() static factories on unsafe pointers
These APIs are redundant with nil literals and the default initializer.

rdar://19159145

Swift SVN r24957
2015-02-04 11:17:55 +00:00
Dmitri Hrybenko
34d393bd22 stdlib: stop using AutoreleasingUnsafeMutablePointer.null()
Swift SVN r24956
2015-02-04 11:17:54 +00:00
Dmitri Hrybenko
f04e0d9748 tests: simplify RUN lines
Swift SVN r24954
2015-02-04 11:17:53 +00:00
Dmitri Hrybenko
5bc75e821a Use a relative path for the in-tree symlink
Swift SVN r24953
2015-02-04 11:17:52 +00:00
Dmitri Hrybenko
0b5843ab43 Add XFAILs for tests that started failing under AddressSanitizer
Swift SVN r24952
2015-02-04 10:43:56 +00:00
Dmitri Hrybenko
c4123d78f4 Remove XFAIL annotations in tests that don't fail under AddressSanitizer anymore
Swift SVN r24951
2015-02-04 10:43:54 +00:00
Dmitri Hrybenko
abc3f1078d Annotate tests that don't crash anymore
Swift SVN r24940
2015-02-04 04:53:05 +00:00
Dave Abrahams
f16398c6db [stdlib] Clean up unintentionally committed dump()s
Swift SVN r24937
2015-02-04 03:21:18 +00:00
Dave Abrahams
ed8c302a93 [stdlib] Move tests that challenge a debug compiler
...into the validation suite.  This is the wrong solution but at least
the bots will continue to run all the tests and we won't regress.

Swift SVN r24934
2015-02-04 01:53:14 +00:00
Dmitri Hrybenko
bea947c53b Annotate compiler crasher tests that now hit assertions under
AddressSanitizer

This is an improvement, previously these tests used to trigger a trap in
AddressSanitizer.

Swift SVN r24919
2015-02-03 17:15:40 +00:00
Joe Pamer
9c2bc50acd In some cases, the same type error will result in different diagnostics being emitted between ARM and x86 targets.
Addressing rdar://problem/19434979 will allow us to swizzle expected errors based on build configuration options,
but until I can push that change we should generalize a few of the expected errors in the FixedPointDiagnostics test,
and re-enable the test on ARM.

Swift SVN r24910
2015-02-03 00:35:09 +00:00
Dmitri Hrybenko
9ade11ae39 XFAIL FixedPointDiagnostics.swift.gyb on armv7 in addition to arm64
<rdar://problem/19677545> Type checker diagnostics differ between
platforms for "var a: UInt8 = -(1)"

Swift SVN r24891
2015-02-02 07:14:36 +00:00
Dmitri Hrybenko
3407325ad4 XFAIL FixedPointDiagnostics.swift.gyb for arm64 because of:
<rdar://problem/19677545> Type checker diagnostics differ between
platforms for "var a: UInt8 = -(1)"

Swift SVN r24884
2015-02-01 06:05:48 +00:00
Joe Pamer
666646fee9 Fix "the world's shortest Swift crasher" (case 1083), as described this afternoon on Twitter by @PracticalSwift. Doing so has the nice side effect of addressing several other crashers.
Swift SVN r24857
2015-01-30 21:50:22 +00:00
Graham Batty
83b4384fac Update test flags for linux failures and support.
Also removed the sdk 'feature' in favour of the more specific
objc_interop.

Swift SVN r24856
2015-01-30 21:31:48 +00:00
Dmitri Hrybenko
8ab8730f73 tests: update CoreAudio test for 32-bit iOS simulator
Swift SVN r24845
2015-01-30 05:10:32 +00:00
Dmitri Hrybenko
cc12389c2e tests: update CoreAudio test for 32-bit iOS simulator
Swift SVN r24844
2015-01-30 05:07:03 +00:00
Dmitri Hrybenko
1ca5bc414e stdlib: add an overlay for AudioBufferList
AudioBufferList contains a fake flexible array member, and is not
imported in a useable way.

rdar://18536929

Swift SVN r24843
2015-01-30 04:17:49 +00:00
Dmitri Hrybenko
203175909d StdlibUnittest: add a command line option to run specific tests
rdar://19572835

Swift SVN r24841
2015-01-30 04:17:44 +00:00
Denis Vnukov
68b756bf90 Fix for rdar://19548610, Fuzzing Swift: performSema(...) crashes: Assertion failed: (Done && "Parser returned early?")
Parser may stop at some erroneous constructions like stray #else or #endif, in some cases closing brace ‘}’, etc…
continue parsing until we are done.



Swift SVN r24822
2015-01-29 21:51:06 +00:00
Denis Vnukov
acda305d01 Fix for rdar://problem/19605164, Fuzzing Swift: abort() in Verifier::checkSourceRanges(...)
Corrected type end location in some erroneous cases.



Swift SVN r24810
2015-01-29 00:43:27 +00:00
Jordan Rose
406592e5c2 Update validation tests for no-asserts builds.
Swift SVN r24803
2015-01-28 19:27:16 +00:00
Dmitri Hrybenko
f4e35f90eb stdlib: remove Unsafe[Mutable]Pointer.null()
This API is redundant with nil literals and the default initializer.

rdar://19159145

Swift SVN r24796
2015-01-28 08:42:28 +00:00
Dmitri Hrybenko
f747652061 tests: clarify some XFAILs with a clear wording from Dave
Swift SVN r24790
2015-01-28 06:03:22 +00:00
Dmitri Hrybenko
263ceabd1e tests: clarify some XFAILs
Swift SVN r24782
2015-01-28 05:22:36 +00:00
Jordan Rose
af9fe66606 Update crash suite for recently fixed cases, likely fixed by Denis.
Swift SVN r24776
2015-01-28 02:37:20 +00:00
Joe Pamer
d2c2add5de Introduce a hack for ensuring that, in the face of unresolved member exprs, call argument types line up nicely with the associated argument tuple type. (rdar://problem/18841652, rdar://problem/18913150, etc.)
This was one of our most visible user-facing crashers, manifesting itself any time a user performed an equality comparison on an unresolved enum case.

Swift SVN r24753
2015-01-27 20:56:03 +00:00
Jordan Rose
0a9d60485f Don't look into a type context to resolve types in the inheritance clause.
Instead, just check the generic parameters, then do a lookup as usual in the
enclosing context.

Fixes crash suite #58 and quite a few others (~200). This looks way more
impressive than it is; in most of these test cases it's the exact same
pattern causing the crash, and that pattern was just the last outstanding
crash trigger in a sea of garbage. (The few deleted tests were identical
to #58.)

Swift SVN r24748
2015-01-27 02:45:29 +00:00
Jordan Rose
c4503ac953 Discard default arguments when inferring a type for a variable.
func a(b: Int = 0) {}
  let c = a // should be (b: Int) -> Void, not (b: Int = 0) -> Void

Fixes crash suite #23.

rdar://problem/18232797

Swift SVN r24747
2015-01-27 02:45:26 +00:00
Jordan Rose
e9839523c9 [test] Add a Radar number to crash suite #55.
Swift SVN r24746
2015-01-27 02:45:25 +00:00
Joe Pamer
1985f1454c Partially unblock SourceKit fuzz-testing by fixing rdar://problem/19534837. To be honest, there are likely many ways to raise the assertion mentioned in the radar, so I don't see this as the end of the unblocking work.
Swift SVN r24723
2015-01-25 22:01:03 +00:00
Dmitri Hrybenko
a503831f36 tests: annotate that 0901-ab.swift does not fail consistently on all
platforms when the compiler is built without assertions

Swift SVN r24718
2015-01-25 06:26:37 +00:00
Dmitri Hrybenko
f808b18eb7 Validation tests: annotate that 0240-argemitter-emitexpanded.swift does
not crash anymore

Swift SVN r24711
2015-01-24 23:53:21 +00:00
Dmitri Hrybenko
b7e61965eb Remove redundant test
Swift SVN r24696
2015-01-24 00:12:21 +00:00
Dmitri Hrybenko
cb2870c230 Update Unicode data files to 7.0.0
rdar://17561742

Swift SVN r24692
2015-01-23 22:17:45 +00:00
Dmitri Hrybenko
7209392bb4 stdlib/Unicode: fix encoding U+20000 and higher to UTF-16
UTF16.{leadSurrogate,trailSurrogate} were converting intermediate
results to UInt16 too soon, causing a trap on U+20000 and higher.

rdar://19156359

Swift SVN r24678
2015-01-23 04:47:02 +00:00
Dmitri Hrybenko
3087d186cb tests: use a more appropriate test name and remove a redundant test
Swift SVN r24676
2015-01-23 03:29:31 +00:00
Dmitri Hrybenko
bbf79427ac stdlib: remove bitwise operations on Bool
Bitwise operations on Bool are redundant with other logic operations
that stdlib already provides.  The only reason to have them was to avoid
branching in the short-circuiting && and ||.

rdar://19340952

Surprisingly, replacing & and | in the standard library with && and ||
brought performance improvements and no significant performance
regressions:

RecursiveOwnedParameter 1.14
SelectionSort 1.19

Swift SVN r24674
2015-01-23 03:09:55 +00:00
Dmitri Hrybenko
2d12d510f2 Lowercase the first character in compiler diagnostics for consistency
Swift SVN r24634
2015-01-22 06:19:14 +00:00
Dmitri Hrybenko
9257f00d27 Update validation tests for compiler changes
Swift SVN r24633
2015-01-22 06:03:46 +00:00
Maxwell Swadling
d379fd2050 updated fixed test assertion
Swift SVN r24617
2015-01-21 23:52:37 +00:00
Maxwell Swadling
007e94c571 [stdlib] updated error message in validation tests
Swift SVN r24616
2015-01-21 23:35:56 +00:00
Dmitri Hrybenko
ff0a6319cc tests: annotate that 0424-no-stacktrace.random.swift now crashes when
assertions are disabled

Swift SVN r24594
2015-01-21 05:45:30 +00:00
Flash Sheridan
3a074e5a50 Assign the result of binary operations to a variable, in preparation for checking its type in my next check-in.
Ugly (both in layout and functionality) workaround for Gyb rdar://15928178, using operator if/else if/else instead of if/elif statements;
this was fiddly to get working, hence the separate check-in.
Sharpen the expected error string for mixed type operators, and add an expected warning and note for assigning the result of
an assignment, which is righteous since we're not C.
Approved by Dmitri.


Swift SVN r24586
2015-01-21 03:54:48 +00:00
Dmitri Hrybenko
3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00
Chris Willmore
68dd563fbf <rdar://problem/18311362> TLF: Eliminate implicit bridging conversions
Require 'as' when converting from Objective-C type to native type (but
continue to allow implicit conversion from native to Objective-C). This
conversion constraint is called ExplicitConversion; all implicit
conversions are covered by the existing Conversion constraint. Update
standard library and tests to match.

Swift SVN r24496
2015-01-18 00:07:45 +00:00
Flash Sheridan
420b05735e Purely cosmetic changes, with a count comment and noting what each %end is closing, to make it easier to track (in both the gyb source and the Swift output) the functional changes I'm struggling with.
Swift SVN r24494
2015-01-17 03:44:43 +00:00