Commit Graph

7859 Commits

Author SHA1 Message Date
Erik Eckstein
461cf5359b tests: Improve comment for StdlibUnittest-import workaround. 2015-11-30 13:11:00 -08:00
Erik Eckstein
308f39fe56 stdlib tests: add import statements to prevent unresolved symbols when compiling StdlibUnittest with -sil-serialize-all.
rdar://problem/18917405
2015-11-19 15:18:18 -08:00
Michael Gottesman
45308f68b1 Try apply insts can also have guaranteed parameters.
This was a piece of code that was not updated with FullApplySite when try_apply
was added.

rdar://23505191
2015-11-19 08:33:56 -08:00
Chris Lattner
b219c9b9ee Update validation test to reflect diagnostic changes. Have I ever mentioned
that it doesn't make sense for validation tests to be checking diagnostics?
2015-11-17 21:34:15 -08:00
Joe Groff
fbd2e4d872 Rename @asmname to @_silgen_name.
This reflects the fact that the attribute's only for compiler-internal use, and isn't really equivalent to C's asm attribute, since it doesn't change the calling convention to be C-compatible.
2015-11-17 14:13:48 -08:00
Ben Langmuir
50cc79c7f2 Fix crash code-completing after 1 + [0]
A literal in a sub-expression of the right-most expression in a sequence
could accidentally still have an error-type when going through CSApply.

rdar://problem/23488528
2015-11-16 11:35:13 -08:00
Xin Tong
6b1328d059 Reapply XFAIL OpenCLSDKOverlay.swift to appease the bots for now. Bug tracked in rdar//23505191 2015-11-14 06:43:42 -08:00
Xin Tong
670c105a9e Revert "Reapply XFAIL OpenCLSDKOverlay.swift to appease the bots for now. Bug tracked in rdar//23505191"
This reverts commit 8c55907efd.

Committed some of my local changes.
2015-11-14 06:42:23 -08:00
Xin Tong
8c55907efd Reapply XFAIL OpenCLSDKOverlay.swift to appease the bots for now. Bug tracked in rdar//23505191 2015-11-14 06:35:55 -08:00
Jordan Rose
bdc42e71d9 Revert several commits working around the autolinking breakage.
Swift was failing to autolink frameworks in the new text-based SDKs.
Clang r253060 fixes the underlying issue, so we can go back to relying
on autolinking for these.

This reverts the following commits (newest to oldest):
f658841
59092a3
7ea9d54
e52ef22

rdar://problem/23511008
2015-11-13 20:21:04 -08:00
Ted Kremenek
216e6d238f Remove tests for SwiftPrivateSerialization (which was removed). 2015-11-13 15:21:07 -08:00
Michael Gottesman
f658841a5f Just disable the GameplayKit test and do not link against GameplayKit everywhere.
Looks like there is a discrepency in between the public/private SDK with the
safety of just including GameplayKit everywhere.

rdar://23527707
2015-11-12 17:23:34 -08:00
Michael Gottesman
59092a3fa3 Disable a test until rdar23505191 is fixed. 2015-11-12 17:03:00 -08:00
Ben Langmuir
7649d3202d [CodeCompletion] Add test for a fixed crasher assigning to AnyObject
rdar://problem/23379556
2015-11-12 13:09:44 -08:00
Chris Willmore
48987d6a20 Update validation test suite after fixing 21967211.
Commit da15fbf fixed 32 compiler crashers.
2015-11-10 23:09:54 -08:00
David Farler
8f2fbdc93a Make function parameters and refutable patterns always immutable
All refutable patterns and function parameters marked with 'var'
is now an error.

- Using explicit 'let' keyword on function parameters causes a warning.
- Don't suggest making function parameters mutable
- Remove uses in the standard library
- Update tests

rdar://problem/23378003
2015-11-09 16:56:13 -08:00
Ted Kremenek
fe93ae2879 Revert "Disable SwiftPrivateSerializationMsgPack.swift to appease the bots for now."
This reverts commit 34ac867eb7.
2015-11-08 09:28:54 -08:00
Xin Tong
34ac867eb7 Disable SwiftPrivateSerializationMsgPack.swift to appease the bots for now.
Issue tracked in rdar://23456019. Will enable once problem fixed.
2015-11-08 09:11:39 -08:00
Erik Eckstein
6cca63cc67 Prevent dead code elimination in fixed point arithmetic trap test.
This is needed after commit [2504257] DeadCodeElimination: remove dead overflow producing operations together with the cond_fail which handles the overflow.
2015-11-04 15:01:11 -08:00
spestov@apple.com
5d88b04e67 Forgot to update some tests for Linux reference counting changes 2015-11-03 15:25:52 -07:00
Ben Langmuir
d119d6e3b0 [CodeCompletion] Update validation-test/IDE after keyword changes 2015-11-02 14:35:09 -08:00
David Farler
4ac9c80809 Add back remaining files for building and testing in Open Source 2015-10-31 00:19:20 -07:00
David Farler
a759ca9141 Disallow 'var' bindings in case patterns
Make the following illegal:

switch thing {
  case .A(var x):
    modify(x0
}

And provide a replacement 'var' -> 'let' fix-it.

rdar://problem/23172698

Swift SVN r32883
2015-10-25 18:53:02 +00:00
Dmitri Hrybenko
9383927356 stdlib: trap correctly in floating-point to unsigned integer conversion
Uncovered by Dave's fixes to gyb.

<rdar://problem/23247773>

Swift SVN r32879
2015-10-25 04:53:37 +00:00
Arnold Schwaighofer
4b424e9b5a XFAIL test to get the bots blue
This started failing after recent gyb changes.

rdar://23247773

Swift SVN r32871
2015-10-24 12:02:49 +00:00
Xin Tong
eadac91a6b Fix a bug in how DSE tracks alive components in partial dead stores. rdar://23218844
Also enable test case disabled to appease the bots.

Swift SVN r32842
2015-10-23 04:34:47 +00:00
Arnold Schwaighofer
9147eab1a7 XFAIL test case that is currently failing when run with optimization
rdar://23218844

Swift SVN r32826
2015-10-22 16:03:47 +00:00
Ben Langmuir
465c2db70e [CodeCompletion] Add a test for some previously crashing extensions
This got incidentally fixed recently, but wasn't yet tested.

rdar://problem/21825270

Swift SVN r32792
2015-10-21 17:58:25 +00:00
Slava Pestov
1b5778ba68 UNSUPPORTED rather than XFAIL
As Jordan pointed out, the frameworks exist in the internal SDK, and
we don't want the tests to fail in this case.

Swift SVN r32734
2015-10-16 22:22:01 +00:00
Slava Pestov
6e5475bbb7 Fixing watchOS simulator test failures
Some of the tests had bitrotted, and others no longer worked
because they used frameworks such as CoreAudio that are not
available in the public SDK for watchOS.

Swift SVN r32733
2015-10-16 22:15:34 +00:00
Doug Gregor
ea3d0b37bf Archetype builder: clean up typo correction and unresolved references.
When typo-correcting a potential archetype (i.e., a nested name
T.foo), record the rename within the potential archetype but don't
consider the signature to be invalid. Move the actual typo-correction
diagnostics and AST fix-ups outside of the archetype builder, so we
get proper Fix-Its and a correct generic signature. Fixes
rdar://problem/20789924.

Swift SVN r32677
2015-10-14 06:27:28 +00:00
Doug Gregor
70968a38fc Use the iterative type checker for TypeChecker::resolveInheritedProtocols.
Swift SVN r32564
2015-10-09 17:18:42 +00:00
Doug Gregor
f247447f03 Iterative type checker: compute inherited protocols of a protocol.
Introduce a type check request for computing inherited protocols and
start using it in a few places.

Swift SVN r32562
2015-10-09 17:18:40 +00:00
Doug Gregor
2feed84c91 Sketch out the interface to an iterative, lazy type checker.
This is all effectively NFC, but lays out the shape of the iterative
type checker: requests are packaged up in TypeCheckRequest, we can
check whether the request has been satisfied already (isSatisfied),
enumerate its dependencies (enumerateDependenciesOf) in terms of other
TypeCheckRequests, and satisfy a request (satisfy).

Lazily-computed semantic information is captured directly in the
AST, but has been set aside in its own structure to allow us to
experiment with moving it into a lookaside table.

The only request that exists now is to type-check the superclass of
the given class. It currently performs unhealthy recursion into the
existing type checker. As we detangle dependencies, this recursion
between the IterativeTypeChecker and the TypeChecker can go away.

Swift SVN r32558
2015-10-09 17:18:36 +00:00
David Farler
fb2381124b Fix CoreMedia CMTimeRange overlay != operator
This was ... returning the same thing as the == operator.

Also, integrate the CoreMedia overlay tests from
rdar://problem/20926198, which caught this problem, and port it
to StdlibUnittest.

Swift SVN r32484
2015-10-07 01:27:36 +00:00
Doug Gregor
34106f7f32 Include the Self type of a protocol type in the list of "all" generic arguments.
It's never bound, but this maintains invariants better and fixes a
number of crashes.

Swift SVN r32430
2015-10-04 06:18:15 +00:00
Dmitri Hrybenko
6536edd68c stdlib: fix coding style
Swift SVN r32425
2015-10-03 21:13:15 +00:00
Doug Gregor
98dadc9800 Teach resolveTopLevelIdentTypeComponent not to modify the component.
Instead, always return the computed Type and let the caller deal with
it. NFC except for accidentally fixing a crasher.

Swift SVN r32377
2015-10-01 20:17:24 +00:00
Arnold Schwaighofer
3e984d25d9 Change test name - we test non unique arrays here
Swift SVN r32282
2015-09-28 21:20:22 +00:00
Arnold Schwaighofer
599a438015 Don't force to grow the buffer everytime we make it unique
rdar://22873620

Swift SVN r32280
2015-09-28 20:47:23 +00:00
Mark Lacey
517723dbe9 Add -enable-sil-verify-all to sil-opt tests.
Also remove -verify from almost all of them, since only two actually
have expected diagnostic output that is tested.

Swift SVN r32198
2015-09-24 07:25:15 +00:00
Slava Pestov
69981a63eb Fix a handful of compiler_crashers were failing on OS X but passing on Linux
I'm too lazy to XFAIL: these, so fix the crash instead.

Swift SVN r32188
2015-09-23 22:27:36 +00:00
Slava Pestov
28c8d0b30d Remove duplicate compiler_crashers
Swift SVN r32187
2015-09-23 22:27:26 +00:00
Slava Pestov
864cc29ccf Remove timeout tests for now
rdar://22812658 tracks re-enabling these.

Swift SVN r32171
2015-09-23 00:59:06 +00:00
Slava Pestov
9fcf7f1bb9 Import latest compiler crashers and regressions from practicalswift
Swift SVN r32157
2015-09-22 21:08:21 +00:00
Doug Gregor
ca3e3968c6 Add back two recently-fixed tests that accidentally got unstaged.
Swift SVN r32019
2015-09-16 23:50:29 +00:00
Doug Gregor
7a3f05a07a Reduce dependency on IdentTypeRepr::getBoundType().
Having bound types in TypeReprs causes trouble in several places
(mostly involving type-checking of generics), and doesn't really fit
with TypeReprs being a mostly syntactic construct. Eliminate some code
paths using getBoundType(), and make the others do the same thing for
getBoundDecl() and getBoundType(). As part of the latter, provide
TypeBase::getDirectlyReferencedTypeDecl() to more easily map from type
to the named declaration.

Swift SVN r32018
2015-09-16 23:25:19 +00:00
Dmitri Hrybenko
0a22034d65 GameplayKit overlay: add explicit tvOS availability
rdar://22707844

Patch by Dave Schaefgen.

Swift SVN r31970
2015-09-15 20:41:18 +00:00
Dmitri Hrybenko
67944589d6 stdlib: improve index invalidation guarantees for removeFirst()
Slice types that are RangeReplaceable (like ArraySlice) now slice
themselves in removeFirst().  Previously, these types were picking up
the wrong default implementation, and they were going through
replaceRange(), which caused all indices to be invalidated.  The new
implementation preserves all indices.

rdar://22536664

Swift SVN r31918
2015-09-12 04:35:51 +00:00
Chris Lattner
cbf145482a This diagnostic improved causing the validation test to fail. Instead of nuking the
error lines outright, move it to the non-validation suite.


Swift SVN r31749
2015-09-07 23:26:41 +00:00