Commit Graph

36 Commits

Author SHA1 Message Date
Max Moiseev
a49dab6bf8 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-29 12:08:52 -08:00
Dmitri Gribenko
a257715fcc Revert "[stdlib] [SE-0031] update stdlib for SE-0031 (inout adjustment)" 2016-02-26 11:17:10 -08:00
Daniel Duan
13b5c8f3bc [SE-0031] update code base for SE-0031 (inout adjustment) 2016-02-26 10:52:10 -08:00
Xi Ge
48754aabfa Module groups: Respect IDE's conventions, use '/' as sub-group indicators. 2016-02-25 18:03:39 -08:00
Dmitri Gribenko
f3389273ba stdlib: String indices: samePositionIn(_:) => samePosition(in:) 2016-02-24 16:29:27 -08:00
Max Moiseev
bb3eaaf308 Merging in latest master 2016-02-24 15:10:25 -08:00
Xi Ge
b812efa4cc Module groups: Make 'lazy views' a sub-group of the 'collection' group. 2016-02-23 13:57:48 -08:00
Max Moiseev
fcad164e18 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-22 12:59:57 -08:00
Xi Ge
845304a90d Module group: Address @natecook1000 and @dabrahams's comments. 2016-02-22 11:50:34 -08:00
Dmitri Gribenko
f27315b6f8 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-20 15:36:04 -08:00
Dmitri Gribenko
3d3d4540e1 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-20 14:37:49 -08:00
Xi Ge
0fc0f6dd23 Module groups: partially address @gribozavr and @natecook1000's comments. 2016-02-20 13:10:06 -08:00
Xi Ge
450391f28f [Serialization] Use the new group mechanism and update tests accordingly. 2016-02-19 17:21:28 -08:00
Dmitri Gribenko
0f36bec31f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-18 16:41:35 -08:00
Dmitri Gribenko
dd75aed67a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-17 14:40:05 -08:00
Xi Ge
dfd0a86986 [SourceKit] Teach SourceKit to recognized USRs for synthesized extensions.
So that IDE can jump to the synthesized extensions instead of the actual extensions.
2016-02-16 17:22:58 -08:00
Max Moiseev
3a3984877a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-15 15:43:34 -08:00
Xi Ge
d5cdbaaee6 [Test] Lessen some tests to make stdlib easier to update. 2016-02-12 11:32:00 -08:00
Nate Cook
c36fad553b Fix tests with updated documentation. 2016-02-12 11:48:28 -06:00
Xi Ge
c97f115219 [ModulePrinter] When printing decls in a module group, we print them according to their source order.
Source order preserves semantic information better than printing alphabetically.
2016-02-10 17:46:49 -08:00
Xi Ge
8b6c6af573 [SourceKit] Teach module interface generator to respect the given module group name.
Input:
  Request Id: 'source.request.editor.open.interface'
  Required Field: 'key.modulename'
  Optional Field: 'key.groupname'

Output:
  If the group name is specified, SourceKit generates interface for the
  module group; otherwise does for the entire module.
2016-02-09 11:49:16 -08:00
Xi Ge
329345077b [SourceKit] Add a new query to collect all group names from a module.
Input:
  Request Id: 'source.request.module.groups'
  Required field: 'key.modulename'

Output:
  Array of group names in that module, if any.
2016-02-08 17:22:10 -08:00
Xi Ge
a25551e54d [SourceKit] Surface group names via cursor info query. 2016-02-05 16:56:41 -08:00
Max Moiseev
61c837209b Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-04 16:13:39 -08:00
Argyrios Kyrtzidis
729a1c89b5 [test] Split an OSX-specific invocation to its own file and make sure to use the mock SDK for a sourcekit test.
rdar://24263618
2016-01-20 20:26:19 -08:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
Chris Lattner
7daaa22d93 Completely reimplement/redesign the AST representation of parameters.
Parameters (to methods, initializers, accessors, subscripts, etc) have always been represented
as Pattern's (of a particular sort), stemming from an early design direction that was abandoned.
Being built on top of patterns leads to patterns being overly complicated (e.g. tuple patterns
have to have varargs and default parameters) and make working on parameter lists complicated
and error prone.  This might have been ok in 2015, but there is no way we can live like this in
2016.

Instead of using Patterns, carve out a new ParameterList and Parameter type to represent all the
parameter specific stuff.  This simplifies many things and allows a lot of simplifications.
Unfortunately, I wasn't able to do this very incrementally, so this is a huge patch.  The good
news is that it erases a ton of code, and the technical debt that went with it.  Ignoring test
suite changes, we have:
   77 files changed, 2359 insertions(+), 3221 deletions(-)

This patch also makes a bunch of wierd things dead, but I'll sweep those out in follow-on
patches.

Fixes <rdar://problem/22846558> No code completions in Foo( when Foo has error type
Fixes <rdar://problem/24026538> Slight regression in generated header, which I filed to go with 3a23d75.

Fixes an overloading bug involving default arguments and curried functions (see the diff to
Constraints/diagnostics.swift, which we now correctly accept).

Fixes cases where problems with parameters would get emitted multiple times, e.g. in the
test/Parse/subscripting.swift testcase.

The source range for ParamDecl now includes its type, which permutes some of the IDE / SourceModel tests
(for the better, I think).

Eliminates the bogus "type annotation missing in pattern" error message when a type isn't
specified for a parameter (see test/decl/func/functions.swift).

This now consistently parenthesizes argument lists in function types, which leads to many diffs in the
SILGen tests among others.

This does break the "sibling indentation" test in SourceKit/CodeFormat/indent-sibling.swift, and
I haven't been able to figure it out.  Given that this is experimental functionality anyway,
I'm just XFAILing the test for now.  i'll look at it separately from this mongo diff.
2015-12-31 19:24:46 -08:00
Chris Lattner
3a23d75a62 Fix a few test failures introduced by 666a42f.
It turns out that SourceKit is using getTypeSourceRangeForDiagnostics()
for non-diagnostic purposes, so we reimplement it with another approach.

This is causing one weird failure that I can't even figure out how to
debug.  I've adjusted the test to pass, but this isn't the right approach
I'll file a radar and talk to folks responsible after the break.
2015-12-30 11:35:30 -08:00
Max Moiseev
0e3b77ec06 Fixing tests for renamed number types 2015-12-10 17:32:16 -08:00
Max Moiseev
7c4a693c3c fixing OptionSetType related tests 2015-12-10 16:59:18 -08:00
Max Moiseev
d610fa0d1c Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-10 10:29:52 -08:00
Max Moiseev
2d2d8ff1ea fixing tests after massive renaming 2015-12-09 17:11:29 -08:00
Xi Ge
218c9607b2 [test] Add a test for previously crashing interface gen. rdar://23544224 2015-12-08 15:39:05 -08:00
Xi Ge
bef5b4301d [SourceKit][PrintObjcHeader] Avoid printing the same Swift decl twice.
Clang and Swift decls likely have many-to-one mappings; for instance,
a RecordDecl and a TypedefDecl in Clang are both imported as the same Swift
NominalTypeDecl. This commit reduces duplication when we print Clang decls in
Swift. rdar://23275959
2015-12-07 16:24:23 -08:00
Jordan Rose
6e1bf0d10d Rename @exported to @_exported for now.
At some point I want to propose a revised model for exports, but for now
just mark that support for '@exported' is still experimental and subject
to change. (Thanks, Max.)
2015-11-05 11:59:00 -08:00
Argyrios Kyrtzidis
8ff6a98a99 [sourcekit] Merge SourceKit into the Swift repo.
The code goes into its own sub-tree under 'tools' but tests go under 'test',
so that running 'check-swift' will also run all the SourceKit tests.

SourceKit is disabled on non-darwin platforms.
2015-11-05 01:09:08 -08:00