Commit Graph

776 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis
92c0980a88 [FixCode] Make sure to accept the fixit in warning about 'where' syntax change. 2016-08-02 13:00:45 -07:00
Argyrios Kyrtzidis
c04aadb1a8 [FixCode] Make sure to accept the fixit in note about adding '@escaping'. 2016-08-02 10:04:40 -07:00
Robert Widmann
80fb5c1c5a Remove usage of getMetatypeLoc() 2016-07-29 16:59:14 -07:00
John McCall
c8c41b385c Implement SE-0077: precedence group declarations.
What I've implemented here deviates from the current proposal text
in the following ways:

- I had to introduce a FunctionArrowPrecedence to capture the parsing
  of -> in expression contexts.

- I found it convenient to continue to model the assignment property
  explicitly.

- The comparison and casting operators have historically been
  non-associative; I have chosen to preserve that, since I don't
  think this proposal intended to change it.

- This uses the precedence group names and higherThan/lowerThan
  as agreed in discussion.
2016-07-26 14:04:57 -07:00
Jordan Rose
508e825ff2 Split 'fileprivate' and 'private', but give them the same behavior.
'fileprivate' is considered a broader level of access than 'private',
but for now both of them are still available to the entire file. This
is intended as a migration aid.

One interesting fallout of the "access scope" model described in
758cf64 is that something declared 'private' at file scope is actually
treated as 'fileprivate' for diagnostic purposes. This is something
we can fix later, once the full model is in place. (It's not really
/wrong/ in that they have identical behavior, but diagnostics still
shouldn't refer to a type explicitly declared 'private' as
'fileprivate'.)

As a note, ValueDecl::getEffectiveAccess will always return 'FilePrivate'
rather than 'Private'; for purposes of optimization and code generation,
we should never try to distinguish these two cases.

This should have essentially no effect on code that's /not/ using
'fileprivate' other than altered diagnostics.

Progress on SE-0025 ('fileprivate' and 'private')
2016-07-25 13:13:35 -07:00
Mark Lacey
1c00ac4c6d Merge remote-tracking branch 'origin/master' into master-next
Conflicts:
	lib/IRGen/IRGen.cpp
	test/DebugInfo/parent-scope.swift
2016-07-15 19:23:53 -07:00
Ben Langmuir
e50c232f4b [FixCode] Add another case of inserting ';' to the ban list
We missed one of the fixits that insert ; separators.

rdar://problem/26681061
2016-07-06 17:08:08 -07:00
Ben Langmuir
cb4b1b601b [FixCode] Apply #selector fixits
These are very useful fixits for migration. Note: this applies the
fixits for selectors that are actually found, but not the one that wraps
an arbitrary string literal in Selector(...), because that one indicates
a possibly missing selector that the user should review.

rdar://problem/26678232
2016-07-05 10:50:39 -07:00
Ben Langmuir
3f026bea27 [FixCode] Don't add .dynamicType
Adding .dynamicType interacts poorly with the swift migrator by
invalidating some inits with type errors.

rdar://problem/26642062
2016-07-05 09:46:38 -07:00
Ben Langmuir
d5d48f38b6 [FixCode] Apply @* is now an attribute on a parameter type fixits 2016-07-05 09:46:38 -07:00
Ben Langmuir
338f40296b [FixCode] Avoid removing @IB* attributes
If there are type-checking issues, these interact poorly with the
migrator and may remove @IB* attributes unnecessarily.

rdar://problem/26886636
2016-07-05 09:46:37 -07:00
Michael Gottesman
8d00a6cb59 Merge remote-tracking branch 'origin/master' into master-next
Conflicts:
	stdlib/public/SDK/GameplayKit/CMakeLists.txt
	test/DebugInfo/bound-namealiastype.swift
	test/DebugInfo/structs.swift
	test/IRGen/c_globals.swift
	test/SourceKit/DocSupport/doc_clang_module.swift
	test/SourceKit/Indexing/index_with_clang_module.swift
	utils/update-checkout
2016-06-25 01:13:50 -07:00
Ben Langmuir
6a6c6ca7ec [FixCode] Update comment missed in previous commit 2016-06-03 11:01:02 -07:00
Ben Langmuir
73f09176e1 [FixCode] Don't accept fixit that inserts commas; they break placeholders
These fixits interact poorly with code that has <#editor placeholder#>s
in it, inserting commas inside the placeholder.

rdar://problem/26623964
2016-06-03 10:47:13 -07:00
Ben Langmuir
d3b40aa483 [FixCode] Pick up fixit for let->var change
This is an important fixit, but was lost because it is on the note
instead of the error.

rdar://problem/26593117
2016-06-02 10:19:45 -07:00
Slava Pestov
2c21b81910 AST: Clean up archetype mangling
Now that we have ArchetypeBuilder::mapTypeOutOfContext(), we can
delete some tricky hand-crafted logic for getting the depth and
index of archetypes.

Notice that the depth of an archetype is now the same as generic
parameters, where depth 0 is the outermost generic context.
Previously it was backwards.

Mostly NFC, except that a few IDE crashers are now fixed because
of asserts firing in removed code, and also the change to depth
mangling (which I think makes sense, and it matches what's written
in docs/ABI.rst).
2016-06-01 12:54:43 -07:00
Argyrios Kyrtzidis
146be88a6e [FixCode] When picking-up fixits for migration ignore the fixits for adding @objc(selector).
These interact badly with the swift migrator, they are triggered by label mismatches in pre-migrated code.

We also don't generally need them since we do inference for the most common cases.
2016-05-26 17:15:19 -07:00
Argyrios Kyrtzidis
48a063e853 [FixCode] Follow-up for b4a2b53739, ignore another diagnostic fixit that is messing with argument labels. 2016-05-26 17:15:19 -07:00
Argyrios Kyrtzidis
b4a2b53739 [FixCode] When picking-up fixits for migration ignore argument label fixits.
These interact badly with the swift migrator, they are undoing migration of arguments to preserve the no-label for first argument.
2016-05-24 16:31:49 -07:00
Argyrios Kyrtzidis
6b8ee42248 [fixcode] Accept the fixit for adding bang to unwrap optional.
This is useful for getting fixits for the IOU handling changes.
2016-05-11 13:58:24 -07:00
Argyrios Kyrtzidis
e5821519a4 [fixcode] Accept the warning fixit for single argument function types requiring parentheses. 2016-05-11 13:33:00 -07:00
Argyrios Kyrtzidis
3dbfd5c1d5 [fixcode] Accept the warning fixit for extraneous duplicate parameter label. 2016-05-09 07:44:34 -07:00
Mark Lacey
182b6dfb18 Merge remote-tracking branch 'origin/master' into master-next
Conflicts:
	tools/driver/CMakeLists.txt
	tools/swift-reflection-dump/swift-reflection-dump.cpp
2016-05-03 14:23:20 -07:00
practicalswift
cd47ad1cf4 [gardening] Fix headers. 2016-04-24 21:51:00 +02:00
John McCall
23f961bc0a Give the FrontendTool library its own header and allow users
to observe progress through the frontend.
2016-04-21 14:59:39 -07:00
John McCall
95eeabb025 Move the -frontend logic into its own library to allow re-use
and abstraction (to come).
2016-04-20 22:54:00 -07:00