Commit Graph

11 Commits

Author SHA1 Message Date
Robert Widmann
5a2479cb2a Expand the no-return diagnostic
Turn on the noreturn diagnostic for cases where a reachable unreachable
could be encountered.  Previously, the diagnostic would not fire if the
function was marked noreturn and any of its reachable unreachable calls
were around.  While this makes sense from a SILGen perspective (it Just
Crashes tm), it is still wrong.  We need to diagnose *everything* that
has reachable unreachables.
2016-08-18 20:39:24 -07:00
Robert Widmann
fdaddcc5dd Uninhabited != NoReturn
Previously, isNever would return true for an equivalence class of
uninhabited enums.  The rest of the compiler, however, is using this in
places that actually expect just the Never type.  This means that code
like this would compile properly

enum Uninhabited {}
func do() -> Uninhabited { /* No body here */ }

and we wouldn’t diagnose the missing return.
2016-08-18 17:46:32 -07:00
Doug Gregor
b9363fe6bd [SE-0111] Enable SE-0111 by default. 2016-07-29 17:28:24 -07:00
Slava Pestov
ddc51c5917 AST: Implement SE-0102, introducing new semantics for Never alongside @noreturn
No migrator support yet, and the code for @noreturn is still in
place.
2016-07-22 14:56:39 -07:00
Chris Lattner
8746676616 Move @noescape and @autoclosure to their new places in various tests, NFC. 2016-04-15 16:05:35 -07:00
Chris Lattner
0619e57a61 Switch the stdlib to use #file instead of __FILE__, and deprecate the __FILE__ identifiers.
This also updates the tests that would otherwise fail.
2016-02-04 15:08:31 -08:00
ken0nek
3ac60b13f5 Add spaces before and after closure arrow in test 2015-12-23 04:38:46 +09:00
Chris Lattner
0224f2d858 Convert more tests off of ++ and -- 2015-12-21 18:07:37 -08:00
Daniel Duan
239c6629e9 Remove trailing semi-colons in .swift files 2015-12-20 21:12:11 -08:00
Daniel Duan
ebb0c3a204 replaced single-line ++/-- with +=/-= 2015-12-15 09:05:37 -08:00
Andrew Trick
bd35b4789c Move test/SILOptimizer files to reflect lib/SILOptimizer. 2015-12-11 15:53:22 -08:00