Commit Graph

8 Commits

Author SHA1 Message Date
Anthony Latsis
6f58cd684b Gardening: Migrate test suite to GH issues: stmt 2022-09-06 15:08:48 +03:00
Hamish Knight
e3e9ef90da [Parse] Properly reject labeled yield
Instead of asserting, emit a diagnostic with a
fix-it to remove the label.

SR-15066
rdar://82132821
2021-09-30 11:00:29 +01:00
Minhyuk Kim
7eaabe1996 Simplify unused lvalue warning wording 2021-01-15 22:14:56 +09:00
Pavel Yaskevich
b813976fd1 [Diagnostics] Port diagnostic for CTP_YieldByReference
Last special case from `FailureDiagnosis::diagnoseContextualConversionError`
has been ported to the new diagnostic framework.
2019-08-21 13:47:39 -07:00
kagemiku
fbba1f7c2f Fix tests for warning messages of defer_stmt_at_block_end 2019-06-07 23:29:14 -07:00
Victor Guerra
ab513c8abb typo on expected-warning. 2018-07-25 23:33:18 +02:00
Victor Guerra
ffd13662d1 addressing comments on PR
- moving WARNING definition from DiagnosticsCommon.def to DiagnosticsSema.def
- improving WARNING message to better align with guidelines described in docs/Diagnostics.md as suggested by @xwu.
- adapting expected warning message in tests.
2018-07-25 23:18:41 +02:00
John McCall
7a4aeed570 Implement generalized accessors using yield-once coroutines.
For now, the accessors have been underscored as `_read` and `_modify`.
I'll prepare an evolution proposal for this feature which should allow
us to remove the underscores or, y'know, rename them to `purple` and
`lettuce`.

`_read` accessors do not make any effort yet to avoid copying the
value being yielded.  I'll work on it in follow-up patches.

Opaque accesses to properties and subscripts defined with `_modify`
accessors will use an inefficient `materializeForSet` pattern that
materializes the value to a temporary instead of accessing it in-place.
That will be fixed by migrating to `modify` over `materializeForSet`,
which is next up after the `read` optimizations.

SIL ownership verification doesn't pass yet for the test cases here
because of a general fault in SILGen where borrows can outlive their
borrowed value due to being cleaned up on the general cleanup stack
when the borrowed value is cleaned up on the formal-access stack.
Michael, Andy, and I discussed various ways to fix this, but it seems
clear to me that it's not in any way specific to coroutine accesses.

rdar://35399664
2018-07-23 18:59:58 -04:00