Commit Graph

195773 Commits

Author SHA1 Message Date
Alexis Laferrière
74c8fcfc66 Merge pull request #85990 from xymus/serial-conf-diag
Serialization: Minor improvements to the error on conformance mismatch
2025-12-12 15:05:53 -08:00
Slava Pestov
a381b1d954 Merge pull request #85968 from slavapestov/tests-12-10-2025
Add some regression tests
2025-12-12 18:05:28 -05:00
Anthony Latsis
dea291c047 Merge pull request #85971 from swiftlang/jepa-main4
SIL: Adjust pack `isa` after upstream LLVM implementation change
2025-12-12 22:20:39 +00:00
Chris McGee
a2529addef Merge pull request #85489 from johnbute/argument-parser-version-change 2025-12-12 15:07:56 -05:00
Hamish Knight
a4ae17133c Merge pull request #85973 from bnbarham/convert-async-shorthand
[SourceKit] Allow converting functions containing shorthand ifs to async
2025-12-12 17:19:23 +00:00
Pavel Yaskevich
3754042c9c Merge pull request #85964 from xedin/rdar-166244164
[Concurrency] Add `ApproachableConcurrency` as a pseudo upcoming feature flag
2025-12-12 09:01:34 -08:00
Gábor Horváth
0fcf2e1ce8 Merge pull request #85980 from Xazax-hun/recursive-enums-fix
[cxx-interop] Fix crashing on recursive enums
2025-12-12 16:45:12 +00:00
Kathy Gray
472937e57d Merge pull request #85591 from kathygray-pl/kathy/diagnosticProperty
[Diagnostics] Increase possibility for missed property diagnostic
2025-12-12 16:09:12 +00:00
John Hui
747234cf0c Merge pull request #86002 from j-hui/migrate-incomplete-template-spec-check 2025-12-12 07:52:00 -08:00
Saleem Abdulrasool
f82cf1ebfb Merge pull request #85993 from compnerd/scanning
swift-scan-test: adjust frontend detection for Windows
2025-12-12 02:25:52 -08:00
Egor Zhdan
ab275373fe Merge pull request #85979 from egorzhdan/egorzhdan/android-ptrauth
[cxx-interop] Handle missing `<ptrauth.h>`
2025-12-12 10:04:02 +00:00
Michael Gottesman
22d182552c Merge pull request #85999 from gottesmm/pr-c29e9002447c10b77a408ede1f7b7e42c5034dbf
[rbi] When looking for closure uses, handle unresolved_non_copyable_value and store_borrow temporaries.
2025-12-12 00:09:08 -08:00
Michael Gottesman
79eee82b87 Merge pull request #85997 from gottesmm/pr-10810fd33c3e8d8fd1e4072f78d63d3200d35aa7
[rbi] Remove highlights from errors.
2025-12-11 23:57:55 -08:00
Chris Williams
fe0191c62c [CSSimplify] Parameter pack wrapping logic incorrectly considers tuple LValueTypes to not be tuples (#85962)
In #65125 (and beyond) `matchTypes`, has logic to attempt to wrap an
incoming parameter in a tuple under certain conditions that might help
with type expansion.

In the case the incoming type was backed by a `var`, it would be wrapped
by an `LValueType` then be subsequently mis-diagnosed as not-a-tuple.

More details in #85924 , this this is also the cause of (and fix for)
#85837 as well...
2025-12-11 22:29:42 -08:00
Slava Pestov
ca12185204 Merge pull request #85967 from slavapestov/dont-copy-that-floppy
Sema: Avoid copying BindingSets
2025-12-12 00:18:47 -05:00
Michael Gottesman
e186e5e5d0 Merge pull request #85972 from gottesmm/pr-9663abc1697da1382a8514e6877a6c3ce3f439b9
[concurrency] Hide Concurrency StackNesting builtins behind a feature flag
2025-12-11 21:16:37 -08:00
John Hui
bb5bb97958 [cxx-interop] Move incomplete template specialization check
We were only previously doing this check when we had a typedef,
because that is the scenario where we encountered this issue.

This patch moves the check closer to where we would actually instantiate
the template, so that these cases can be stopped in more situations.
2025-12-11 18:53:47 -08:00
Michael Gottesman
d64fda488e [rbi] When looking for closure uses, handle unresolved_non_copyable_value and store_borrow temporaries.
This ensures that in cases like the following:

+func testNoncopyableNonsendableStructWithNonescapingMainActorAsync() {
+  let x = NoncopyableStructNonsendable()    <=========
+  let _ = {
+    nonescapingAsyncClosure { @MainActor in
+      useValueNoncopyable(x) // expected-warning {{sending 'x' risks causing data races}}
+      // expected-note @-1 {{task-isolated 'x' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses}}
+    }
+  }
+}

We emit the diagnostic on the use instead of the <=====.

rdar://166347485
2025-12-11 18:45:06 -08:00
Michael Gottesman
8bea3518f5 [rbi] Remove highlights from errors.
I have noticed over time when working on the command line, we often times
highlight too large of an expression due to the locations provided to us by
earlier parts of the compiler. This isn't technically necessary and the
following doesn't look nice... so remove it.

```
test5.swift:171:16: error: sending 'x' risks causing data races [#SendingRisksDataRace]
169 |   let _ = {
170 |     nonescapingAsyncUse { @MainActor in
171 | _ _ _ _ _u_s_e_V_a_l_u_e_(_x_)
    |                |- error: sending 'x' risks causing data races [#SendingRisksDataRace]
    |                `- note: task-isolated 'x' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
172 |     }
173 |   }
```
2025-12-11 17:29:20 -08:00
Mishal Shah
ef9e3efaaf Merge pull request #85995 from swiftlang/revert-85542-revert-85534-revert-71422-docc
Revert "Revert "Revert "build: setup a CMake based build for DocC"""
2025-12-11 16:27:53 -08:00
Mishal Shah
6f32ad0dae Revert "Revert "Revert "build: setup a CMake based build for DocC""" 2025-12-11 16:25:44 -08:00
Saleem Abdulrasool
9918933045 Merge pull request #85896 from Steelskin/fabrice/update-bootstrap-arm64-toolchain
utils: Update the bootstrap Windows toolchain
2025-12-11 16:02:30 -08:00
Karoy Lorentey
a233485029 Merge pull request #82055 from vanvoorden/string-identical
[SE-0494][StdLib] Add `isTriviallyIdentical(to:)` Methods to String and Substring
2025-12-11 15:55:11 -08:00
Saleem Abdulrasool
54f5837c7b swift-scan-test: adjust frontend detection for Windows
Ensure that we account for file system arc separators and extensions by
using the LLVM functions rather than trying to simply do string
matching. This allows us to properly handle inputs on Windows.
2025-12-11 15:29:56 -08:00
Andrew Trick
d609889e87 Merge pull request #85934 from atrick/fix-closure-liveness
Fix InteriorUseWalker: consider partial_apply [on_stack] an escape
2025-12-11 15:05:21 -08:00
Ben Cohen
9dd9e96e1d Allow Hashable: ~Copyable (#85748)
Builds on #85746 which covers Equatable.
2025-12-11 14:47:36 -08:00
Ben Barham
b8e3e4b7b2 Merge pull request #85966 from bnbarham/disable-userdoc-freebsd
[Test] Disable userdoc validation on freebsd
2025-12-12 08:00:29 +10:00
Ben Barham
2dee8c4dac Merge pull request #85974 from bnbarham/so-long-and-thanks-for-all-the-fish
Remove Ben Barham from code owners
2025-12-12 07:58:16 +10:00
Pavel Yaskevich
6526dca9db [Concurrency] Add ApproachableConcurrency as a pseudo upcoming feature flag
Enables upcoming features that aim to provide a more approachable path to Swift Concurrency:
 - `DisableOutwardActorInference`
 - `GlobalActorIsolatedTypesUsability`
 - `InferIsolatedConformances`
 - `InferSendableFromCaptures`
 - `NonisolatedNonsendingByDefault`

Resolves: rdar://166244164
2025-12-11 10:36:03 -08:00
Dario Rexin
1f8e88d659 Merge pull request #85908 from drexin/wip-163631865
[IRGen] Use proper linkage for async function pointers to partial app…
2025-12-11 09:52:51 -08:00
Joe Groff
560eb9deaa Merge pull request #85954 from jckarter/sil-require-require-instruction
SIL verifier: The `atInstruction`/`atArgument` parameter to `require` should not be optional.
2025-12-11 09:43:43 -08:00
Joe Groff
f9fcd88298 Merge pull request #85959 from jckarter/borrow-accessor-address-only-non-escapable
SIL: Handle address ReturnInsts from borrow accessors as yielding uses.
2025-12-11 09:43:27 -08:00
Evan Wilde
3b99b43d91 Merge pull request #85931 from etcwilde/ewilde/stringprocessing-flags
CMake: StringProcessing: More apple flags
2025-12-11 09:22:21 -08:00
Kathy Gray
fde49b8847 Diagnostics : Increase possibility for missed property diagnostic
Impact for an unknown property access was frequently higher than other options
on ambiguous selections, by 3 to 5 points, causing fix selections that were
farther away and frequently noted to be in accurate. This commit lowers the
impact to be in a similar range to other fixes and this causes property accesses
to be selected more proprotionaly.

In the existing test suite, this changed the diagnostic only in the case of
protocol composition, which was also discovered to be a flawed binding lookup.

Tests added for the property lookup, tests updated for protocol composition
(Including correcting a likely error in a test specification)
2025-12-11 16:08:22 +00:00
Gabor Horvath
181122edf9 [cxx-interop] Fix crashing on recursive enums
Introduce a cache that helps cutting the recursion when we process a
type that we already visited before but did not finish processing yet.

Fixes #85361

rdar://164153038
2025-12-11 15:24:03 +00:00
Arnold Schwaighofer
c1c05e1298 Merge pull request #85948 from aschwaighofer/embedded_enable_existential_support
[embedded] Enable support for existentials/boxed protocol types per default
2025-12-11 07:16:26 -08:00
Anthony Latsis
9b2a7efbf2 SIL: Adjust pack isa after upstream LLVM implementation change
See https://github.com/llvm/llvm-project/pull/161403.

These `isa` calls with a `CanType` no longer compile with LLVM next
because the implementation now unfolds directly to `CastInfo` calls
rather than non-variadic `isa` calls that resolve to our partial
specializations here:

e293876e4f/include/swift/AST/Type.h (L600)

We should partially specialize `CastInfo` instead of `isa` et al. For
now, just use the non-variadic `isa`.
2025-12-11 14:18:47 +00:00
Hamish Knight
088bda7424 Merge pull request #85952 from hamishknight/skip-body-macro
[AST] Avoid walking macro expanded bodies in non-expanded mode
2025-12-11 14:08:45 +00:00
Ben Barham
7887ce8a8e [SourceKit] Allow converting functions containing shorthand ifs to async
Resolves rdar://154753663.
2025-12-11 21:46:37 +10:00
Egor Zhdan
063b906966 [cxx-interop] Handle missing <ptrauth.h>
Android NDK, as of version 28, does not include the `ptrauth.h` header. This causes CI failures when building the Swift SDK for Android on Windows.

rdar://166242941
2025-12-11 11:39:20 +00:00
Susana Monteiro
91d1d2e06f Merge pull request #85793 from susmonteiro/susmonteiro/diagnose-swift-attrs
[cxx-interop] Diagnose invalid swift attributes
2025-12-11 11:06:41 +00:00
Max Desiatov
125a63d349 docs/WebAssembly.md: add Wasm stdlib testing steps (#85947)
Added instructions for building and running Wasm stdlib tests, including filtering options and environment variable usage.
2025-12-11 09:06:42 +00:00
Slava Pestov
956dc0c1a2 Merge pull request #85955 from slavapestov/fix-issue-85860
SILGen: Fix keypath descriptor emission for class nested inside generic context
swift-DEVELOPMENT-SNAPSHOT-2025-12-11-a
2025-12-11 00:36:18 -05:00
Saleem Abdulrasool
6253a0d60b Merge pull request #85900 from compnerd/library-binning
test: adjust the path compuation for plugins
2025-12-10 21:26:09 -08:00
Ben Barham
432935e37d Remove Ben Barham from code owners 2025-12-11 14:28:24 +10:00
Hiroshi Yamauchi
5634d99c4f Add several headers to WinSDK (#85915)
This was needed for explicit module builds to work for internal apps.
2025-12-10 19:31:27 -08:00
Michael Gottesman
7b9281fcb8 [concurrency] Hide Concurrency StackNesting builtins behind a feature flag.
rdar://166244033
2025-12-10 16:02:18 -08:00
Slava Pestov
a0927392f3 Add some regression tests 2025-12-10 18:49:41 -05:00
Slava Pestov
56baeac901 Sema: More descriptive comment for determineLiteralCoverage() 2025-12-10 18:48:47 -05:00
Slava Pestov
205d8e6640 Sema: Remove unnecessary operator new overload 2025-12-10 18:48:47 -05:00