Commit Graph

32 Commits

Author SHA1 Message Date
Xi Ge
1625bcfbba ASTPrinter: skip underscored keyword when printing for quick helps.
rdar://47777848
2019-03-13 17:53:51 -07:00
Ben Cohen
ae6f5dd604 [stdlib] Add consuming/owned annotations to Collection implementations (#19360)
* Add consuming/owned annotations to Collection implementations

* Update SILOptimizer tests

* Fix access_marker_verify test

* XFAIL reconstruct_type_from_mangled_name
2018-09-21 12:06:56 -07:00
Erik Eckstein
39bb14b094 change mangling prefix from $S to $s
This is the final ABI mangling prefix

rdar://problem/38471478
2018-09-19 13:55:11 -07:00
Ben Langmuir
368e25ec05 [sourcekit] Fix tests that depend on accepting frontend arguments
These tests were relying on sourcekitd parsing as frontend instead of
using the driver.  Update them now to avoid churn when we fix command
line argument parsing in sourcekit.

The changes from clang-importer-sdk to clang-importer-sdk-nosource -I %t
are because clang-importer-sdk implies using -enable-source-import.
Rather than hack them up to use -Xfrontend, it is cleaner to just stop
using source import at all for these tests.  Incidentally, this improved
fidelity in a few places.  When using the generated swift modules we
also need to pass a target triple to sourcekit, which exposed some tests
that had mac-specific data.  This is a systemic issue for sourcekit
tests, but for now just make those few specific tests that we had
problems with run only on mac.
2018-02-05 10:09:03 -08:00
Nate Cook
5afeecb246 [stdlib] Remove MutableCollection.sorted methods (#14005)
* [stdlib] Remove MutableCollection.sorted methods

This removes the implementations of sorted() and sorted(by:) on Mutable-
Collection, which only changed some minor wording in the docs.

This also adds documentation to the partition(by:) implementations so that
they will appear downstream.

* [stdlib] De-gyb CollectionAlgorithms.swift

* Update tests for MutableCollection.sorted() changes
2018-01-23 14:17:32 -08:00
Erik Eckstein
cd3d50a5d9 ABI: Change the mangling prefix from _T0 to $S 2018-01-06 13:55:59 -08:00
Slava Pestov
d63bf4ee41 Sema: Fix for bogus ParenType showing up in deduced associated types
When matching inputs of a function type, be sure to
strip off ParenType sugar so that we don't end up
with ParenTypes in associated type witnesses.

This fixes various issues with SE-0110.

Fixes <rdar://problem/32214649>.
2017-05-17 00:39:46 -07:00
Ben Cohen
ea2f64cad2 [stdlib] Add Sequence.Element, change ExpressibleByArrayLiteral.Element to ArrayLiteralElement (#8990)
* Give Sequence a top-level Element, constrain Iterator to match

* Remove many instances of Iterator.

* Fixed various hard-coded tests

* XFAIL a few tests that need further investigation

* Change assoc type for arrayLiteralConvertible

* Mop up remaining "better expressed as a where clause" warnings

* Fix UnicodeDecoders prototype test

* Fix UIntBuffer

* Fix hard-coded Element identifier in CSDiag

* Fix up more tests

* Account for flatMap changes
2017-05-14 06:33:25 -07:00
Norio Nomura
3da7926a5e Revert "Revert "Enable SourceKit tests if building SourceKit""
This reverts commit a383adf9df.
2017-04-26 21:16:36 +09:00
Arnold Schwaighofer
a383adf9df Revert "Enable SourceKit tests if building SourceKit" 2017-04-24 17:59:03 -07:00
Alex Blewitt
71987b90b2 Merge pull request #8485 from norio-nomura/enable-sourcekit-test
Enable SourceKit tests if building SourceKit
2017-04-24 17:37:30 +01:00
Norio Nomura
c49fa3c6d2 [SourceKit] Mark some tests requires objc_interop 2017-04-04 18:45:04 +09:00
codestergit
aa9e9edc8a [Stdlib] Improves sort and sorted to accept throwing clousre
This commit resolves https://bugs.swift.org/browse/SR-715
2017-04-03 16:59:02 +05:30
Roman Levenstein
397d801e19 Merge pull request #7350 from swiftix/resilience-benchmarks
Add a lot of resilience-related annotations to stdlib to improve the performance of the resilient stdlib
2017-03-16 21:22:13 -07:00
Erik Eckstein
761d6512fe SourceKit: switch to new mangling in ide::printDeclTypeUSR
This was still missing.
2017-03-16 19:57:16 -07:00
Roman Levenstein
2c811b82a1 Adjust some tests to pass in non-resilient and resilient modes. 2017-03-16 19:46:11 -07:00
Erik Eckstein
7995d3d35a SourceKit: Use new mangling for USR generation. 2017-02-23 12:47:10 -08:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Michael Ilseman
c37751ae96 [noescape by defaul] make noescape the default
This flips the switch to have @noescape be the default semantics for
function types in argument positions, for everything except property
setters. Property setters are naturally escaping, so they keep their
escaping-by-default behavior.

Adds contentual printing, and updates the test cases.

There is some further (non-source-breaking) work to be done for
SE-0103:

- We need the withoutActuallyEscaping function
- Improve diagnostics and QoI to at least @noescape's standards
- Deprecate / drop @noescape, right now we allow it
- Update internal code completion printing to be contextual
- Add more tests to explore tricky corner cases
- Small regressions in fixits in attr/attr_availability.swift
2016-07-29 13:49:08 -07:00
Dave Abrahams
014b6972cf isOrderedBefore: => by areInIncreasingOrder: 2016-07-19 07:05:54 -06:00
Michael Gottesman
fc37603c5f Revert "Implement SE-0118" 2016-07-18 16:44:58 -07:00
Dave Abrahams
f3ccc956c6 isOrderedBefore: => by areInIncreasingOrder: 2016-07-18 14:29:09 -06:00
Michael Gottesman
40e1991e12 Revert "Name and label changes for closure parameters (for review only) (#2981)"
This reverts commit 18406900ba.
2016-07-15 19:45:26 -07:00
Dave Abrahams
18406900ba Name and label changes for closure parameters (for review only) (#2981)
Implement SE-0118 Name and label changes for closure parameters

[SE-0118](https://github.com/apple/swift-evolution/blob/master/proposals/0118-closure-parameter-names-and-labels.md)
2016-07-15 15:31:48 -07:00
Xi Ge
a5e51a3494 [SourceKit] In CursorInfo response, include the mangle name of the type of the underlying decl.
The mangled name of the type is identical to those for debugger. These
mangled names allow us to reconstruct the type from AST and generate interface
specifically for that type.

Related rdar://27306890
2016-07-12 13:10:58 -07:00
Chris Lattner
a0c5d2a7df adjust autoclosure/noescape printing to print them in their type
position instead of before a parameter.  This wraps up the meat of
SE-0049.
2016-04-15 17:04:12 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Manav Gabhawala
7862f104c9 [Parser] Cleans up parsing of parameter attributes. Implements SE-0053. Fixes SR-979, SR-1020 and cleans up implementation of SE-0003. Provides better fix-its and diagnostics for misplaced 'inout' and prohibits 'var' and 'let' from parameter attributes 2016-03-29 13:55:46 -04:00
Xi Ge
fda0751cae [SourceKit] In interface-gen request, allow clients to send SourceKit an interested USR from which we can infer the group name. 2016-03-23 17:26:44 -07:00
Xi Ge
3dd149ab99 [SourceKit] CursorInfo: The result of cursor info for a module name starts to include group names in that module. 2016-03-21 17:20:18 -07:00
Xi Ge
c85591bc25 [SourceKit] CursorInfo: not showing @warn_unused_result in quick help. 2016-03-18 16:39:27 -07:00
Ben Langmuir
503887c5f2 [SourceKit] Split SourceDocInfo tests into CursorInfo and RelatedIdents subdirectories
Unless you're familiar with the way the swift source code is organized,
it's not clear what "SourceDocInfo" means, or how it is different from
DocSupport, etc.  Move the tests into directories that are named based
on their request (note: we already had one test under CursorInfo, which
just made things even more confusing).
2016-03-17 16:31:46 -07:00