Commit Graph

19 Commits

Author SHA1 Message Date
Michael Gottesman
d7e6054dc9 [concurrency] Remove from test RUN lines uses of enable-upcoming-feature RegionBasedIsolation when it is already inferred from strict-concurrency=complete. 2025-08-08 19:04:07 -07:00
Daniel Rodríguez Troitiño
ba68faaed5 [test] Mark tests that use experimental/upcoming features as such
Find all the usages of `--enable-experimental-feature` or
`--enable-upcoming-feature` in the tests and replace some of the
`REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which
should correctly apply to depending on the asserts/noasserts mode of the
toolchain for each feature.

Remove some comments that talked about enabling asserts since they don't
apply anymore (but I might had miss some).

All this was done with an automated script, so some formatting weirdness
might happen, but I hope I fixed most of those.

There might be some tests that were `REQUIRES: asserts` that might run
in `noasserts` toolchains now. This will normally be because their
feature went from experimental to upcoming/base and the tests were not
updated.
2024-11-02 11:46:46 -07:00
Allan Shortlidge
c02fc4724d Tests: Remove -disable-availability-checking from many Concurrency tests.
Instead, use the `%target-swift-5.1-abi-triple` substitution to compile the tests
for deployment to the minimum OS versions required for use of _Concurrency APIs.
2024-10-18 16:21:51 -07:00
Pavel Yaskevich
697e1fb861 [Sema] EffectsChecker: Adjust application classifier to skip invertible protocol requirements
Refactors application classifier to center around substitution map
and strip invertible protocol requirements that have no effect.

Resolves: rdar://123356909
2024-03-14 14:16:21 -07:00
Michael Gottesman
99e3f7fb13 [region-isolation] Make RegionBasedIsolation an upcoming feature for swift 6.
To make the tests pass, I had to teach sil-opt how to setup upcoming features
since it did not know how to parse them.

rdar://124100266
2024-03-05 15:15:14 -08:00
Michael Gottesman
cb46851194 [region-isolation] Rename the experimental feature to RegionBasedIsolation.
This ensures that the pass is called TransferNonSendable but the experimental
feature is RegionBasedIsolation.
2023-10-26 12:01:44 -07:00
Michael Gottesman
0bad8f9b67 [region-isolation] Rename SendNonSendable.cpp -> TransferNonSendable.cpp. 2023-10-26 12:01:44 -07:00
Michael Gottesman
b53af9419c [send-non-sendable] Add REQUIRES: asserts to concurrency tests that use SendNonSendable. 2023-08-31 19:25:23 -07:00
Michael Gottesman
026f1735b5 [send-non-sendable] Update concurrency tests so that we run them in all concurrency modes as appropriate.
This means that:

1. In test cases where minimal is the default (swift 5 without
-warn-concurrency), I added RUN lines for targeted, complete, and complete +
sns.

2. In test cases where complete is the default (swift 6, -warn-concurrency,
specified complete with -strict-concurrency), I added a send non-sendable run
line.

In each of these cases, I added additional expected-* lines as appropriate so
the tests can compile in each mode successfully.
2023-08-30 13:40:17 -07:00
Doug Gregor
eeeea49764 Remove -enable-experimental-concurrency almost everywhere. 2021-07-26 21:24:43 -07:00
Doug Gregor
1e2012d816 Disable availability checking in tests that use concurrency 2021-07-20 12:46:26 -07:00
Evan Wilde
3da0a540eb Update tests
This patch updates all the tests to accept the new error messages.
*Gack* so many things needed cleaning up.
2021-04-24 07:51:18 -07:00
Doug Gregor
c76dac7155 Banish @asyncHandler to a hidden flag.
We don't want @asyncHandler to be part of the concurrency model, so put
it behind a different flag.
2021-03-25 16:45:21 -07:00
Kavon Farvardin
74eb1a7ae6 allow property/subscript access expressions for actors in typechecker
We now mark some DeclRefExpr and LookupExprs as implicitly async
during typechecking, depending on whether they appear in a context
that is only performing a read / get operation, and whether they
are cross-actor operations.

also resolves rdar://72403401 by improving the error messages
(no more vague "'await' in async context" when its clearly a call!)
2021-03-04 18:37:32 -08:00
Kavon Farvardin
9342540661 add fix-it to note for "add 'async' to function"
resolves rdar://72313654
2021-02-11 14:44:49 -08:00
Doug Gregor
3c38ffe0ea [Concurrency] await try -> try await
The `try await` ordering is both easier to read and indicates the order
of operations better, because the suspension point occurs first and
then one can observe a thrown error.
2020-12-23 13:21:59 -08:00
Kavon Farvardin
e8dcc979a0 fix-it regression coverage for notes suggesting 'async', '@asyncHandler' and '@GlobalActorType'
Currently, we don't have a fix-it to insert 'async', so I've marked those places
as not expecting a fix-it, until someone goes and implements that (rdar://72313654)
2020-12-14 15:21:27 -08:00
Kavon Farvardin
d4f4dd31b5 fix cases where error message was not specific when missing an 'await' in autoclosure argument.
when the call in an autoclosure is async and throwing, if the call is covered by a try! or try?,
the existing check that used Context::isAutoClosure was too pessimistic, saying it is not an
autoclosure because errors are handled within it. For the error message about a missing await,
we don't care about whether the throwing-ness was handled.
2020-11-04 10:35:46 -08:00
Kavon Farvardin
84b6308008 add regression test for rdar://70751405 and rdar://70813762 2020-11-03 16:57:41 -08:00