Commit Graph

195786 Commits

Author SHA1 Message Date
Pavel Yaskevich
1f887202e1 [Diagnostics] Don't attempt to synthesize arguments when destructuring a single tuple argument results in an overrun
If arguments are represented by a single tuple it's possible
that the issue is not about missing parameters but instead
about tuple destructuring. Fix `fixMissingArguments` to check for
overruns after destructuring and stop if that produces more
arguments then parameters because such situations are better
diagnosed as a general conversion failure rather than a missing
argument(s) problem.

Resolves: rdar://159408715
2025-12-09 16:52:41 -08:00
Kyle Robson
f8f107f857 <rdar://165142180> fix immediate Task docs (#85626)
Co-authored-by: Kyle Robson <kyledr@apple.com>
2025-12-10 09:51:19 +09:00
Slava Pestov
d5c049ed69 Sema: Better debug output in compareSolutions() 2025-12-09 18:38:19 -05:00
Slava Pestov
f3e6b4ceda Sema: Disambiguate some more bidirectional conversions
This fixes an ambiguity introduced by the stdlib change in
0f99458900.

Since (borrowing T) -> () and (T) -> () both convert to
each other, we could end up with ambiguous solutions where
neither one was better than the other. Generalize the
existing trick we use for labeled vs unlabeled tuples to
also strip off ownership specifiers and @convention(...)
from function types. This fixes the regression, as well
an existing FIXME in a test I added a while ago where
the same problem arises with @convention(block).
2025-12-09 18:31:59 -05:00
Slava Pestov
5e952e9b22 Merge pull request #85902 from slavapestov/csbindings-cleanups
Sema: A few more simple CSBindings cleanups
2025-12-09 18:29:53 -05:00
Meghana Gupta
4089775de8 Fix swiftinterface printing of accessors and inferred lifetime dependencies when Lifetimes feature is enabled 2025-12-09 14:59:41 -08:00
Andrew Trick
f7c3c6f437 Fix InteriorUseWalker: consider partial_apply [on_stack] an escape
Fixes a bug in MandatoryDestroyHoisting where a captured value is destroyed
before a copy of the closure.

On-stack closures can be copied, and all copied uses must be within the borrow
scope of the captured operand. This is just like any other non-Escapable value,
so treat it as such by checking `Value.mayEscape` rather than `Type.Escapable`.

Originally, I wanted to make it illegal to copy of partial_apply [on_stack], but
it looks like we still allow it.

I would rather not complicate any logic yet with special handling for this
case. To fix any performance concerns, we might be able to simplify the
representation instead by banning copy_value on on-stack closures.

Fixes rdar://165850554 swift-frontend crash: While running "CopyPropagation" -
Invalid SIL provided to OSSACompleteLifetime?!)
2025-12-09 14:38:04 -08:00
Slava Pestov
1e9f8826a7 Sema: Split off Apple-specific parts of bidirectional_conversions.swift test 2025-12-09 17:35:04 -05:00
Ben Barham
8e06293dca Merge pull request #85875 from bnbarham/fix-up-userdocs
Fix up the userdocs index
2025-12-10 08:28:11 +10:00
Evan Wilde
b2797334eb CMake: StringProcessing: Embed Plist Sections
Generate and embed plists for StringProcessing libraries.

rdar://165944416
2025-12-09 13:39:36 -08:00
Alexis Laferrière
85d522e4c2 Merge pull request #85917 from xymus/exportability-nle-classes
Sema: Allow non-open class properties to reference hidden dependencies in non-library-evolution mode
2025-12-09 13:36:01 -08:00
John Hui
f1e2b7a07f Merge pull request #85723 from an0/my-branch
[ClangImporter] Fix NS_CLOSED_ENUM to validate raw values
2025-12-09 13:35:30 -08:00
Evan Wilde
1f9bdcadc2 CMake: StringProcessing: Catalyst support
Enable catalyst support in Apple StringProcessing builds
2025-12-09 13:34:29 -08:00
Augusto Noronha
47eda910c1 Merge pull request #85916 from augusto2112/speedup-protocols-main
[NFC][RemoteInspection] Use existing cache to build conformance table
2025-12-09 13:06:41 -08:00
Hamish Knight
d9222877e0 [test] Add a couple more unterminated string delimiter test cases 2025-12-09 21:02:55 +00:00
Hamish Knight
20bee09dc9 Merge pull request #85889 from hamishknight/overrun
[Parse] Fix buffer overrun in `advanceIfMultilineDelimiter`
2025-12-09 20:26:24 +00:00
Steven Wu
756e53967e [TEST-ONLY] Add utility to perform explicit module build
Add a script to build all dependencies for explicit module build in one
step. This reduces the boiling plate code needed to write a test for
explicit module build and allows the test to be more cross platform and
resilient to module dependencies changes.
2025-12-09 12:16:18 -08:00
Augusto Noronha
1627b5fc24 Merge pull request #85911 from augusto2112/factor-context-descriptor-symbol
[RemoteInspection] Factor out buildContextDescriptorManglingForSymbol
2025-12-09 11:24:53 -08:00
Arnold Schwaighofer
4d879967a7 [embedded] Feature::EmbeddedExistentials requires Feature::Embedded 2025-12-09 10:21:51 -08:00
Rick van Voorden
0ab8884657 add 6.4 symbols to abi tests 2025-12-09 09:35:34 -08:00
Eric Miotto
3bbd7da6e7 Merge pull request #85872 from edymtt/edymtt/android-build-builtin-float-before-math
CMake Android: ensure _Builtin_float is built before _math
2025-12-09 09:17:22 -08:00
Gábor Horváth
d97fa92a33 Merge pull request #85650 from Xazax-hun/refcounted-ptr-conversions
[cxx-interop] Introduce SWIFT_REFCOUNTED_PTR
2025-12-09 17:01:08 +00:00
Egor Zhdan
a6b30c4dd0 Merge pull request #85869 from egorzhdan/egorzhdan/remove-interop-compat-version
[cxx-interop] Remove compatibility versions
2025-12-09 15:45:00 +00:00
Tim Kientzle
3670162137 Disable unsupported configuration 2025-12-09 15:42:14 +00:00
Slava Pestov
3c4fef164e Sema: Add some LLVM_DEBUG output to CSBindings.cpp 2025-12-09 09:44:52 -05:00
Slava Pestov
25d9829af9 Sema: Remove incorrect usage of big-O notation from comment 2025-12-09 09:43:22 -05:00
Hamish Knight
f25b4b4fcc Merge pull request #85897 from hamishknight/retraction
[Demangler] Handle invertible reqs for extensions in `findDeclContext`
2025-12-09 14:32:55 +00:00
finagolfin
6d4931986f [autolink-extract] Update deduplication list for Observation (#85856)
All linux and Android CI show this being repeated many times, eg when
[building the Docc binary on the linux
CI](https://ci.swift.org/job/swift-PR-Linux-smoke-test/24247/consoleText):
```
"/home/build-user/build/buildbot_linux/unified-swiftpm-build-linux-x86_64/x86_64-unknown-linux-gnu/release/docc.build/main.swift.o" "-lswiftObservation" ... repeated many times ... "-lswiftObservation" "-lswiftCore"
```
2025-12-09 19:46:07 +05:30
Egor Zhdan
84e7f82363 Reapply "[ConstraintSystem] C++ Interop: Binding a string literal to std.string shouldn't increase the score"
This reverts commit 6852bc9834.

In addition to the original change, this makes sure that C++ `std::string` and Swift `String` are given distinct score, in order to prevent ambiguity which was causing build failures in some projects.

rdar://158439395
2025-12-09 12:55:18 +00:00
Tim Kientzle
a6e3f5535c Disable some unsupported test combinations 2025-12-09 09:31:24 +00:00
Tim Kientzle
2e56ce0b98 Minor perf tweak 2025-12-09 09:30:38 +00:00
Hamish Knight
0a8a3bc753 Merge pull request #85895 from hamishknight/fuzzy
[test] Add some more known crashers
2025-12-09 09:21:59 +00:00
Hamish Knight
1fc04bf681 Merge pull request #84514 from hamishknight/not-privy
[Sema] Exclude private initialized vars from memberwise initializer
2025-12-09 04:19:13 +00:00
Ben Rimmington
b27c90b8b8 [SE-0494] isTriviallyIdentical(to:) [memory regions] (#84998)
Add `isTriviallyIdentical(to:)` methods to:

* `Span`
* `RawSpan`
* `UTF8Span`
* `UnsafeBufferPointer`
* `UnsafeMutableBufferPointer`
* `UnsafeRawBufferPointer`
* `UnsafeMutableRawBufferPointer`

Part of issue swiftlang/swift#84991.
2025-12-08 19:32:26 -08:00
Arnold Schwaighofer
0c7aded660 Merge pull request #85871 from aschwaighofer/lazy_metadata_emission_embedded_exist
[embedded] Lazily emit class metadata in embedded mode and apply shared linkage
2025-12-08 18:13:38 -08:00
Rick van Voorden
8c9f084d86 substring test nits 2025-12-08 17:35:51 -08:00
Karoy Lorentey
a3650e79e6 [test] Update tests, acknowledging new additions 2025-12-08 17:32:20 -08:00
Karoy Lorentey
e5787c661d [stdlib] String, Substring: Use new _StringGuts helper 2025-12-08 17:32:20 -08:00
Karoy Lorentey
4cde919950 [stdlib] Update availability of String view additions 2025-12-08 17:32:20 -08:00
WindowsMEMZ
8055d91316 Update tests for availability checking 2025-12-08 17:32:19 -08:00
WindowsMEMZ
288a69842d Add isIdentical to StringGuts and use it for comparation 2025-12-08 17:32:19 -08:00
WindowsMEMZ
14e37a15ec Make isIdentical opaque for clients 2025-12-08 17:32:19 -08:00
WindowsMEMZ
5b22d2a467 Add tests 2025-12-08 17:32:19 -08:00
WindowsMEMZ
be5ec1aed4 Add isTriviallyIdentical for unicode views 2025-12-08 17:32:19 -08:00
Karoy Lorentey
c8202c6f9a Apply suggestions from code review 2025-12-08 17:32:19 -08:00
Karoy Lorentey
3833cbdd87 [test] Fix ABI expectations 2025-12-08 17:32:19 -08:00
Karoy Lorentey
a7b152b94b [benchmark] Remove new benchmarks 2025-12-08 17:32:19 -08:00
Karoy Lorentey
b7e32db453 [stdlib] Update availability of isTriviallyIdentical methods 2025-12-08 17:32:19 -08:00
Karoy Lorentey
794bbb99b4 [stdlib] Define availability for the 6.4 stdlib and runtime 2025-12-08 17:32:19 -08:00
Rick van Voorden
abae2f6547 [stdlib] string identical
Co-Authored-By: Karoy Lorentey <klorentey@apple.com>
2025-12-08 17:32:19 -08:00