Commit Graph

9 Commits

Author SHA1 Message Date
Anthony Latsis
edd4010664 Gardening: Migrate test suite to GH issues: decl/func 2022-08-26 03:26:32 +03:00
David Hart
01b5b6a037 [SR-4205] Removed the non_trailing_closure_before_default_args warning (#8033)
rdar://problem/21193574 says that this warning dates back to when closure args before default args used to be considered as trailing closures. This is not the case anymore so Jordan suggested we remove the warning.
2017-03-15 09:55:08 -07:00
David Farler
b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08: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
David Farler
3f635d04c7 Reinstante var bindings in refutable patterns, except function parameters.
This reverts commits: b96e06da44,
                      8f2fbdc93a,
                      93b6962478,
                      64024118f4,
                      a759ca9141,
                      3434f9642b,
                      9f33429891,
                      47c043e8a6.

This commit leaves 'var' on function parameters as a warning to be
merged into Swift 2.2. For Swift 3, this will be an error, to be
converted in a follow-up.
2016-01-29 15:27:08 -08:00
David Farler
93b6962478 Warn when using 'var' bindings in function parameters
These will no longer be allowed in a future Swift release.

rdar://problem/23172698
2015-11-03 17:24:20 -08:00
Chris Lattner
ada5487153 add fixit tests to random other tests.
Swift SVN r31006
2015-08-04 20:35:36 +00:00
Chris Lattner
ddd6192094 Implement 3 prominent feature requests:
<rdar://problem/15975935> warning that you can use 'let' not 'var'
<rdar://problem/18876585> Compiler should warn me if I set a parameter as 'var' but never modify it
<rdar://problem/17224539> QoI: warn about unused variables

This uses a simple pass in MiscDiagnostics that walks the body of an
AbstractFunctionDecl.  This means that it doesn't warn about unused properties (etc),
but it captures a vast majority of the cases.

It also does not warn about unused parameters (as a policy decision) because it is too noisy,
there are a variety of other refinements that could be done as well, thoughts welcome.



Swift SVN r28412
2015-05-11 06:26:05 +00:00
Doug Gregor
1dbbf92660 Add a warning when a closure parameter is followed by defaulted parameters.
This finds cases where something that used to be a trailing closure is
no longer a trailing closure due to the recent rule change.

Swift SVN r25289
2015-02-14 00:23:38 +00:00