Commit Graph

7859 Commits

Author SHA1 Message Date
Greg Parker
9e23ebcec6 [test] Un-XFAIL GameplayKit tests. Reverts r29021.
Swift SVN r29024
2015-05-26 05:04:05 +00:00
Greg Parker
d7f92109a4 [test] Temporarily XFAIL GameplayKit tests on iOS until the test devices update
Swift SVN r29021
2015-05-26 04:06:01 +00:00
Dave Abrahams
abf8e2f921 [stdlib] ~>_copyToNativeArrayBuffer() => method
Swift SVN r29001
2015-05-25 03:28:54 +00:00
Dave Abrahams
0fdc73bf43 [stdlib] Minimize and rename _UnsignedIntegerType
The protocol is still needed in order to make sure mixed signed/unsigned
arithmetic doesn't compile, but after pulling all its "real"
requirements into UnsignedIntegerType, that's now its only function.
Thus, rename it to _DisallowMixedSignArithmetic.

Swift SVN r28980
2015-05-24 02:09:14 +00:00
Chris Lattner
ffddcf1023 update validation test for diagnostic change.
Swift SVN r28967
2015-05-23 16:15:57 +00:00
Doug Gregor
a6300dfdc5 "Properly" compute the depth of Self in ill-formed protocol declarations.
Rather than always using depth 0 for the Self generic type parameter
of a protocol, which is the correct value in well-formed code,
actually compute the depth based on the context. This maintains the
depth invariants of the AST in ill-formed code, resolving a large
number of crashers (169), including rdar://problem/21042357, and
regresses one crasher.

Swift SVN r28920
2015-05-22 16:28:29 +00:00
Joe Groff
32fb006386 Clang Importer: Enable OptionSetType import.
Update the tests to match.

Swift SVN r28906
2015-05-22 05:47:37 +00:00
Doug Gregor
2b01e748fd Remove uses of parameter ‘#’ from the validation testsuite.
Swift SVN r28843
2015-05-20 20:21:45 +00:00
Dmitri Hrybenko
fe239e3d03 stdlib: de-underscore sort() and partition() methods
Swift SVN r28839
2015-05-20 19:34:36 +00:00
Dmitri Hrybenko
53f3ccf850 stdlib: change CollectionType.count() into a property
Swift SVN r28829
2015-05-20 09:14:43 +00:00
Dmitri Hrybenko
ca1cdefb76 tests: fix the names of fake collections in tests for partition()
Swift SVN r28821
2015-05-20 03:44:59 +00:00
Dmitri Hrybenko
4a677190eb stdlib: move partition() to a protocol extension
Swift SVN r28816
2015-05-20 03:12:55 +00:00
Jordan Rose
5e74224140 [test] Move stdlib/Algorithm test to validation-test suite.
It takes a long time to compile (at least partly due to rdar://problem/20875936)
and then takes a long time to run (because it's a very large collection of
test cases). Dmitri says he prefers not to split it up into multiple tests.

This cuts my debug compiler / debug stdlib local testing time by over 15%.

Swift SVN r28811
2015-05-20 01:23:23 +00:00
Greg Parker
15b99a26d9 Test: Add %target-clang substitution.
Swift SVN r28758
2015-05-19 06:08:36 +00:00
Dmitri Hrybenko
abc7677337 GameplayKit overlay: adjust to SDK changes
Swift SVN r28738
2015-05-19 01:55:30 +00:00
Dmitri Hrybenko
47595ee1db stdlib: change sort() and sorted() into protocol extensions
Swift SVN r28736
2015-05-19 01:55:29 +00:00
Dmitri Hrybenko
17cafb6b3a Revert "stdlib: don't use doc comment markup for non-doc comments"
This reverts commit 28724.  It contains unintended changes.

Swift SVN r28725
2015-05-18 21:51:53 +00:00
Dmitri Hrybenko
e964eb7384 stdlib: don't use doc comment markup for non-doc comments
rdar://problem/20976063

Swift SVN r28724
2015-05-18 21:50:24 +00:00
Dmitri Hrybenko
a2096f187c Add the WatchKit overlay
rdar://20438380

Swift SVN r28654
2015-05-16 00:32:42 +00:00
Dmitri Hrybenko
eac42662dc Add a failing test case for rdar://20985062
Swift SVN r28653
2015-05-16 00:29:15 +00:00
Dmitri Hrybenko
1b61cefb44 The ObjectiveC test requires objc_interop
Swift SVN r28594
2015-05-15 00:51:40 +00:00
Dmitri Hrybenko
25d9a4fe32 stdlib: protocol extensions: de-underscore filter()
The API was adjusted according to the API review previously.

Swift SVN r28592
2015-05-15 00:37:01 +00:00
Dmitri Hrybenko
7c8a394cb1 Move NSObject extensions to the ObjectiveC overlay
NSObject is defined in the ObjectiveC module, not in Foundation.

rdar://20526438

Swift SVN r28591
2015-05-15 00:34:25 +00:00
Greg Parker
2c8fa1816a [test] Remove an XFAIL: asan that no longer fails.
Swift SVN r28529
2015-05-13 21:01:29 +00:00
Slava Pestov
93dc28be59 Revert "Unused binding analysis now recurses into type declarations"
This reverts revision r28480, after mailing list discussion it is
agreed that this is a bad idea.

Note that a test had to be updated adding a new expected warning.

Swift SVN r28515
2015-05-13 17:12:58 +00:00
Dmitri Hrybenko
3a2bb97cd6 Fix tests for expectCrashLater() for iOS
On iOS we recieve a different signal.  That's not the point of the test,
and since we FileCheck the message anyway, the exact signal name does
not really matter.

Swift SVN r28513
2015-05-13 08:47:33 +00:00
Dmitri Hrybenko
e315581f74 StdlibUnittest tests: use a runtime trap to test expectCrashLater
This change makes the test output the same in normal runs and in ASan
builds.

Swift SVN r28507
2015-05-13 06:36:15 +00:00
Dmitri Hrybenko
843d8a4eb7 stdlib: protocol extensions: de-underscore map()
Swift SVN r28502
2015-05-13 01:58:46 +00:00
Ted Kremenek
6884540019 Revert "Re-enable validation-test/stdlib/SceneKit.swift."
This is failing on the bots.

Swift SVN r28501
2015-05-13 00:24:10 +00:00
Ted Kremenek
86dc008e5b Adjust test to new #available syntax.
Swift SVN r28497
2015-05-12 23:36:13 +00:00
Dmitri Hrybenko
c8e1ac8435 Add the GameplayKit overlay
Swift SVN r28495
2015-05-12 23:12:06 +00:00
Ted Kremenek
b564dd5e02 Re-enable validation-test/stdlib/SceneKit.swift.
Implements rdar://problem/20738811

Swift SVN r28494
2015-05-12 22:56:47 +00:00
Dmitri Hrybenko
945259f704 SDK overlay: add a smoketest for the CoreMedia overlay
Swift SVN r28493
2015-05-12 22:53:12 +00:00
Slava Pestov
8eabf84450 Sema: diagnose capturing type declarations for now
Properly implementing a class whose methods capture variables
defined in the outer scope requires adding the captures as
hidden vars in the class and initializers, and seems
non-trivial.

Just diagnose this case for now instead of crashing.

Fixes <rdar://problem/20853958>.

Swift SVN r28481
2015-05-12 18:19:37 +00:00
Dmitri Hrybenko
61214ec55b stdlib: remove Sliceable conformance from String
Swift SVN r28442
2015-05-11 20:58:31 +00:00
Slava Pestov
0ad2696d79 Don't pass -enable-guaranteed-self in tests
NFC

Swift SVN r28426
2015-05-11 18:21:35 +00:00
Chris Lattner
ddd6192094 Implement 3 prominent feature requests:
<rdar://problem/15975935> warning that you can use 'let' not 'var'
<rdar://problem/18876585> Compiler should warn me if I set a parameter as 'var' but never modify it
<rdar://problem/17224539> QoI: warn about unused variables

This uses a simple pass in MiscDiagnostics that walks the body of an
AbstractFunctionDecl.  This means that it doesn't warn about unused properties (etc),
but it captures a vast majority of the cases.

It also does not warn about unused parameters (as a policy decision) because it is too noisy,
there are a variety of other refinements that could be done as well, thoughts welcome.



Swift SVN r28412
2015-05-11 06:26:05 +00:00
Dmitri Hrybenko
0d42ed3eb2 StdlibUnittest: provide explanatory output about failing crash tests
Swift SVN r28404
2015-05-10 23:17:44 +00:00
Joe Groff
1af4659c4a Enable interface type mangling.
Fixes rdar://problem/18034517, and addresses a number of compiler crashers due to symbol collisions in the old mangling.

Swift SVN r28383
2015-05-09 22:20:57 +00:00
Doug Gregor
2f0c1b151e Use the archetype for unqualified lookup within protocols and extensions thereof.
When performing unqualified lookup within a type context (or method
thereof) that is a protocol or a protocol extension, use the Self
archetype of the protocol or extension so we look in types implied by
the requirements as well. Part of rdar://problem/20509152, fixing the
example provided in rdar://problem/20694545.

Swift SVN r28363
2015-05-09 03:42:16 +00:00
Dmitri Hrybenko
bdd9250f12 stdlib: add tests for ${ArrayType}.init(SequenceType)
Swift SVN r28362
2015-05-09 03:32:37 +00:00
Chris Lattner
f12f1040e8 Two tests stop crashing and two start crashing due to parsing the pattern of a let decl
as an irrefutable pattern.  The crashers in the new ones are in the generics system.



Swift SVN r28349
2015-05-09 00:18:10 +00:00
Doug Gregor
0749486302 Let unqualified lookup find members of protocols and extensions thereof.
Members of protocols found via unqualified name lookup are mapped to
their corresponding witnesses, as we do for qualified name
lookup. This is the bulk of the compiler changes for
rdar://problem/20509152. Performing this mapping for unqualified name
lookup of types will follow.

Swift SVN r28333
2015-05-08 23:22:13 +00:00
Slava Pestov
74c2cb7820 Sema: more robust diagnostic for circular inheritance
The code would generate different diagnosics depending on
the cycle having length 1 or longer. The length 1 case
was broken if the path had a prefix that wasn't part
of the cycle, eg if we have C : A, A : A and visit C
first.

Swift SVN r28317
2015-05-08 17:14:57 +00:00
Dmitri Hrybenko
947c702ff9 Mark two compiler crashers as fixed
Swift SVN r28312
2015-05-08 02:39:32 +00:00
Dmitri Hrybenko
f46f16ae82 stdlib: implement new print() API
rdar://20775683

Swift SVN r28309
2015-05-08 01:37:59 +00:00
Ted Kremenek
9f9bb725cf Rename '_ErrorType' to 'ErrorType'.
Swift SVN r28293
2015-05-07 21:59:29 +00:00
Dmitri Hrybenko
10ab07ade5 Revert "Remove {Dictionary,Set,UnsafeMutableBufferPointer,UnsafeBufferPointer}.count"
This reverts commit r28248 while we discuss the change.

Swift SVN r28291
2015-05-07 21:45:28 +00:00
Dmitri Hrybenko
8ac6c7cf8f Remove {Dictionary,Set,UnsafeMutableBufferPointer,UnsafeBufferPointer}.count
These APIs are redundant with APIs that come from protocol extensions.

Swift SVN r28248
2015-05-07 00:30:43 +00:00
Dmitri Hrybenko
c109ec9125 stdlib: protocol extensions: de-underscore count()
Swift SVN r28246
2015-05-07 00:30:38 +00:00