Skip to content

Commit 07251be

Browse files
committed
Revert "Implement 'rethrows' checking in Sema."
This was asserting in the performance suite. Swift SVN r28491
1 parent 9be9444 commit 07251be

File tree

3 files changed

+113
-932
lines changed

3 files changed

+113
-932
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,30 +1798,13 @@ ERROR(isa_pattern_value,sema_tcp,none,
17981798

17991799
ERROR(try_unhandled,sema,none,
18001800
"errors thrown from here are not handled", ())
1801-
ERROR(throwing_call_unhandled,sema,none,
1802-
"call can throw, but the error is not handled", ())
18031801
ERROR(tryless_throwing_call_unhandled,sema,none,
18041802
"call can throw, but it is not marked with 'try' and "
18051803
"the error is not handled", ())
18061804
ERROR(throw_in_nonthrowing_function,sema,none,
18071805
"error is not handled because the enclosing function "
18081806
"is not declared 'throws'", ())
18091807

1810-
ERROR(throwing_call_in_rethrows_function,sema,none,
1811-
"throwing call in 'rethrows' function is not to a parameter "
1812-
"function", ())
1813-
ERROR(tryless_throwing_call_in_rethrows_function,sema,none,
1814-
"throwing call in 'rethrows' function is not to a parameter "
1815-
"function and is not marked with 'try'", ())
1816-
ERROR(throw_in_rethrows_function,sema,none,
1817-
"'rethrows' function may only throw by calling a parameter "
1818-
"function", ())
1819-
NOTE(because_rethrows_argument_throws,sema,none,
1820-
"call is to 'rethrows' function, but argument function can throw", ())
1821-
NOTE(because_rethrows_default_argument_throws,sema,none,
1822-
"call is to 'rethrows' function, but a defaulted argument function"
1823-
" can throw", ())
1824-
18251808
ERROR(throwing_call_in_nonthrowing_autoclosure,sema,none,
18261809
"call can throw, but it is executed in a non-throwing "
18271810
"autoclosure",())
@@ -1835,11 +1818,11 @@ ERROR(throw_in_nonthrowing_autoclosure,sema,none,
18351818
ERROR(try_unhandled_in_nonexhaustive_catch,sema,none,
18361819
"errors thrown from here are not handled because the "
18371820
"enclosing catch is not exhaustive", ())
1838-
ERROR(throwing_call_in_nonexhaustive_catch,sema,none,
1839-
"call can throw, but the enclosing catch is not exhaustive", ())
18401821
ERROR(tryless_throwing_call_in_nonexhaustive_catch,sema,none,
18411822
"call can throw, but it is not marked with 'try' and "
18421823
"the enclosing catch is not exhaustive", ())
1824+
ERROR(throwing_call_in_nonexhaustive_catch,sema,none,
1825+
"call can throw, but the enclosing catch is not exhaustive", ())
18431826
ERROR(throw_in_nonexhaustive_catch,sema,none,
18441827
"error is not handled because the enclosing catch is not exhaustive", ())
18451828

0 commit comments

Comments
 (0)