Argyrios Kyrtzidis
91ce77d55a
[test] Follow-up for commit b4a2b53739, add test methods with function bodies.
2016-05-24 16:43:27 -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
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
Max Moiseev
9391b0a848
Reverting fixits-apply.swift changes applied on merge
2015-12-23 11:34:42 -08:00
Max Moiseev
200be71583
Merge remote-tracking branch 'origin' into swift-3-api-guidelines
2015-12-23 10:28:04 -08:00
Chris Lattner
2bfb788ef2
remove the logic for upgrading Swift 1's print that used "appendNewline"
...
to Swift 2 syntax that uses "terminator". It is legacy, and removing it
allows simplifications.
2015-12-22 14:42:18 -08:00
Doug Gregor
a97ab6dd14
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2015-12-18 10:15:47 -08:00
practicalswift
8ab8847684
Fix typos.
2015-12-16 22:09:32 +01:00
Maxim Moiseev
0e0191380a
OptionSetType => OptionSet
2015-12-10 14:58:24 -08:00
Dmitri Gribenko
feacbc4433
Rename ErrorType to ErrorProtocol
2015-12-09 17:12:19 -08:00
Dmitri Gribenko
174d475833
stdlib: Remove unavavailable APIs that were left as migration aids
...
These APIs are from the Swift 1.2 => Swift 2.0 transition, and are not
relevant anymore.
Removing them reduces the surface area of the library that needs to be
reviewed.
2015-12-02 01:19:50 -08:00
Argyrios Kyrtzidis
1d5e9e0acd
[FixCode] Introduce '-fixit-all' option that, when -fixit-code is enabled, applies all fixits from diagnostics without any filtering.
...
Swift SVN r31772
2015-09-08 18:30:49 +00:00
Argyrios Kyrtzidis
ab9375a3ec
[Sema] Add a diagnostic fixit for the "print(_:appendNewline:)" -> "print(_:terminator:)" change.
...
Swift SVN r31237
2015-08-14 01:05:37 +00:00
Argyrios Kyrtzidis
310d92ecc1
[stdlib] Add RawOptionSetType as unavailable with a 'renamed' fixit to OptionSetType.
...
rdar://21800523
Swift SVN r30313
2015-07-17 07:16:10 +00:00
Argyrios Kyrtzidis
514a57d02a
[Sema] Find the 'var' location of 'catch' variables so that the warning "variable x was never mutated; consider changing to 'let’ constant",
...
can add a fixit for it.
rdar://21137461
Swift SVN r29106
2015-05-28 17:16:16 +00:00
Dave Abrahams
d65f696344
Kill off [_]RawOptionSetType
...
Now that we are using OptionSetType for option sets, all the support for
doing things the old way can die.
Note: the fix-it that used to apply to RawOptionSetType, it seemed to me,
should still apply to OptionSetType, so I switched it over instead of
removing it.
Swift SVN r29066
2015-05-27 15:55:54 +00:00
Argyrios Kyrtzidis
4bcb2d0b97
[Sema] Add a compiler fixit for erroneously returning an unnecessary cast of a raw value of a RawOptionSet.
...
The primary motivation is to address SDK change of a common API.
The diagnostic checks return statements per advice from JoeP to simplify implementation.
rdar://21034343
Swift SVN r28826
2015-05-20 07:53:35 +00:00
Argyrios Kyrtzidis
fcf040402a
[fixit] Avoid picking up the fixit which adds a bang.
...
Adding a bang can be unsafe and may lead to silently adding crashes in user's code.
Err on the side of caution and let the compiler error stand so the user can review the code.
Swift SVN r28467
2015-05-12 14:11:00 +00:00
Argyrios Kyrtzidis
a01e7c27cf
[fixit] Apply the 'forced_downcast_coercion' warning automatically.
...
This can show up when upgrading due to ObjC generics changes.
Swift SVN r28454
2015-05-12 05:14:38 +00:00
Chris Lattner
31c01eab73
Change the meaning of "if let x = foo()" back to Xcode 6.4 semantics. The compiler
...
includes a number of QoI things to help people write the correct code. I will commit
the testcase for it as the next patch.
The bulk of this patch is moving the stdlib, testsuite and validation testsuite to
the new syntax. I moved a few uses of "as" patterns back to as? expressions in the
stdlib as well.
Swift SVN r27959
2015-04-30 04:38:13 +00:00
Argyrios Kyrtzidis
d646c3178c
[fixit-code] Apply the fixit for the refutable pattern warning.
...
Swift SVN r27253
2015-04-13 15:28:29 +00:00
Argyrios Kyrtzidis
8b250d6d35
[driver] Remove the 'swift-fixit' symlink and introduce '-emit-fixits-path' frontend option that
...
writes compiler fixits as source edits.
Driver option '-fixit-code' adds '-emit-fixits-path' for all the frontend invocations.
Swift SVN r27208
2015-04-10 17:33:29 +00:00
Argyrios Kyrtzidis
d2c502b2c3
Do some renames to match-up with the 'swift-fixit' name.
...
Swift SVN r27140
2015-04-08 22:13:59 +00:00