Commit Graph

9 Commits

Author SHA1 Message Date
Pavel Yaskevich
cd83345651 [Concurrency] NonisolatedNonsendingByDefault: Don't attempt to migrate $ prefixed declarations
These are special declarations that are synthesized by the compiler
or a macro and warnings about them are non-actionable.

(cherry picked from commit 17976c7775)
2025-06-16 13:44:02 -07:00
Pavel Yaskevich
93c955c4f9 [Concurrency] NonisolatedNonsendingByDefault: Don't attempt to migrate swift-testing test cases
The execution of these functions is controlled by the testing
framework and it's okay if their behavior changes when the feature
flag is enabled.

Resolves: rdar://152687527
(cherry picked from commit f2f5d234dc)
2025-06-16 13:44:02 -07:00
Pavel Yaskevich
c0984d2bf5 [Concurrency] NonisolatedNonsendingByDefault/NFC: Move 'same module' check higher
This is a follow-up to https://github.com/swiftlang/swift/pull/82173
which moves the check higher to make it an early exist.

(cherry picked from commit f0502c2257)
2025-06-12 10:42:32 -07:00
Pavel Yaskevich
20e086cdc7 [Concurrency] NonisolatedNonsendingByDefault: Migration applies only to the current module declarations
Prevent migration from handling declarations that come from a
module different from the current one, this is primarily a
problem for swiftinterfaces that can get rebuilt when the module
is imported by a model that has migration mode enabled.

Resolves: rdar://152687353
(cherry picked from commit bcd6caaea4)
2025-06-12 10:19:46 -07:00
Anthony Latsis
ee4d103500 Sema: Fix an issue with NonisolatedNonsendingByDefault migration for closures
See the inline comments for more details. Depending on the closure's
type signature, sometimes adding the attribute will break code. Fix this
by also adding inferred effects to the signature in these cases.

(cherry picked from commit 2d7e040d4d)
2025-05-21 00:10:00 +01:00
Anthony Latsis
e5a10a37d0 Sema: Fix UB in NonisolatedNonsendingByDefault migration diagnosis
The diagnostic can outlive the locally constructed attribute, which was
passed by pointer, if there is an active `DiagnosticTransaction`.

(cherry picked from commit f4e49d5a0a)
2025-05-16 21:25:08 +01:00
Pavel Yaskevich
61c8e70c66 [Feature] Rename Feature APIs from adoption to migration
(cherry picked from commit 085078dd8a)
2025-05-14 20:28:46 -07:00
Michael Gottesman
e92e9dff0c Make Feature a struct enum so we can put methods on it.
Just noticed this as I was looking at making other changes.

(cherry picked from commit 3ff9463957)
2025-05-14 16:07:04 -07:00
Pavel Yaskevich
d007d7adfb [Frontend] Rename AsyncCallerExecution upcoming feature to NonisolatedNonsendingBeDefault
(cherry picked from commit c110941c27)
2025-04-22 00:33:45 -07:00