Commit Graph

25 Commits

Author SHA1 Message Date
Doug Gregor
7d70b704e4 Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines 2016-01-19 23:18:20 -08:00
David Farler
a6f2530780 Revert "REVERTME: Temporarily make vars in refutable patterns a warning"
This reverts commit b96e06da44, making
vars in refutable patterns an error for Swift 3.

rdar://problem/23172698
2016-01-14 20:52:24 -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
666a42f5c7 Remove the ability to map back from a ParamDecl to its enclosing Pattern. This
is used by precisely one thing (producing a warning in a scenario that is obsolete
because we deprecated the entire thing), so the complexity isn't worth it anymore.
2015-12-29 21:09:11 -08: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
Chris Lattner
f04d2bb828 Implement <rdar://problem/20336036> QoI: Add cast-removing fixit for "Forced cast from 'T' to 'T' always succeeds"
Swift SVN r29876
2015-07-02 00:28:44 +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