Commit Graph

195605 Commits

Author SHA1 Message Date
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
Hamish Knight
20bee09dc9 Merge pull request #85889 from hamishknight/overrun
[Parse] Fix buffer overrun in `advanceIfMultilineDelimiter`
2025-12-09 20:26:24 +00: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
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
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
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
Ryan Mansfield
4754eeaef8 Merge pull request #85898 from rjmansfield/fix-issue-78598-back-deployment
[test] Mark issue-78598.swift as unsupported on back deployment runtime.
2025-12-08 20:12:53 -05:00
Augusto Noronha
ab507becb4 [RemoteInspection] Factor out buildContextDescriptorManglingForSymbol
A previous commit introduced the usage of buildContextManglingForSymbol
in buildContextDescriptorMangling, which was not quite correct, since
type nodes needed extra handling, which was done in the other version of
buildContextDescriptorMangling. This patch factors out the handling of
building context descriptors mangling from symbols, and updates both
call sites to use the new function instead.

rdar://165950673
2025-12-08 16:36:14 -08:00
Hamish Knight
45683f6561 [Sema] Exclude private initialized vars from memberwise initializer
Exclude properties with initial values from the memberwise initializer
if they are less accessible than the most accessible property, up to
`internal`. Introduce a compatibility overload that continues to
include the same properties as before until the next language mode.

This is gated behind the `ExcludePrivateFromMemberwiseInit` feature.

rdar://122416579
2025-12-08 23:22:35 +00:00
Hamish Knight
e383766e93 [SILGen] Handle default initialization of init accessor in memberwise init
If the property isn't memberwise initializable we need to emit its
initial value and call the init accessor. This currently isn't necessary
since all init accessor properties are included in the memberwise
initializer, but the following commit will change this.
2025-12-08 23:22:35 +00:00
Hamish Knight
1d8341bd0b [Sema] Swap init accessor check in MemberwiseInitPropertiesRequest
Currently `init` accessors are always memberwise initialized, but I'm
planning on changing that. As such we need to make sure we record
the `init` accessor regardless of whether it is included in the memberwise
init.
2025-12-08 23:22:35 +00:00
Hamish Knight
17af03d622 [Sema] Factor out InitializablePropertiesRequest
This serves as the backing request for both InitAccessorPropertiesRequest
and MemberwiseInitPropertiesRequest, ensuring the former does not
care about the init accessor is included in the memberwise initializer.
2025-12-08 23:22:35 +00:00
Hamish Knight
302e803b2f [AST] Store original lazy VarDecl for backing storage
Store the original VarDecl in the same map we use for tracking the
original wrapper var for property wrappers. This will allow us to
use the same logic to determine the original var for both.
2025-12-08 23:22:35 +00:00
Hamish Knight
c02fb8b1a1 [AST] Factor out printMemberwiseInit
Move the printing logic into libAST such that it can be used both by
the refactoring and by fix-it logic in Sema.
2025-12-08 23:22:35 +00:00
Hamish Knight
01b965fe3c [IDE] Use Identifier for printing member name in generateMemberwiseInit
Avoid relying on the source text and print the identifier, escaping
if needed.
2025-12-08 23:22:35 +00:00
Hamish Knight
442a11bb0d [AST] NFC: Remove some unused declarations 2025-12-08 23:22:35 +00:00
Pavel Yaskevich
df3aa1e011 Merge pull request #85879 from xedin/add-supression-note-to-explicit-sendable-warning
[Diagnostics] TildeSendable: Suggest `Sendable` suppression in explic…
2025-12-08 13:29:25 -08:00
Alexis Laferrière
de9148e6f1 Merge pull request #85868 from xymus/exportability-nle-split
Sema: Distinguish implicitly visible memory layouts from the typical `@frozen` ones
2025-12-08 13:29:16 -08:00
Ryan Mansfield
e60ca698c6 Merge pull request #85440 from rjmansfield/fix-wmo-opt-record-paths
Fix optimization record paths in multi-threaded WMO mode
2025-12-08 16:14:53 -05:00
Slava Pestov
8f4d1b1f9c Merge pull request #85903 from slavapestov/readme-fix
docs: Fix links to Windows docs in README.md
2025-12-08 15:20:56 -05:00
Pavel Yaskevich
7d3e40b7bb Merge pull request #85830 from jamieQ/no-async-in-await-fixit
[Sema]: add fixit for `no_async_in_await` warning
2025-12-08 11:26:32 -08:00
Augusto Noronha
f89131d7d8 Merge pull request #85878 from augusto2112/fix-private-disc-main
[RemoteInspection] Read ContextDescriptor from symbol if available
2025-12-08 11:13:16 -08:00
Ben Cohen
58f661cfba Allow Equatable: ~Escapable (#85854)
Adds `~Escapable` to #85746
2025-12-08 09:50:50 -08:00
Slava Pestov
d9dcc88c46 docs: Fix links to Windows docs in README.md 2025-12-08 10:12:02 -05:00
Arnold Schwaighofer
93e494bc40 Attempt to fix test on linux 2025-12-08 07:07:09 -08:00
Ryan Mansfield
a7e22a36c8 [test] Mark issue-78598.swift as unsupported on back deployment runtime. 2025-12-08 08:15:10 -05:00
Hamish Knight
d8a867df86 [Demangler] Handle invertible reqs for extensions in findDeclContext
If we didn't find an extension result, try again disregarding
invertible requirements since `demangleGenericSignature` won't
include them. This is just meant to be a quick low risk fix that we
can cherry-pick, the proper fix here is to delete all this logic and
just return the nominal along with the ABI module name to filter
lookup results.

rdar://165639044
2025-12-08 12:21:29 +00:00
Charles Zablit
3e2943ff62 Merge pull request #85858 from charles-zablit/charles-zablit/update-checkout/fix-clone-warning 2025-12-08 12:34:12 +01:00
Hamish Knight
3aaeaefa97 [test] Add some more known crashers 2025-12-08 11:01:59 +00:00
Hamish Knight
148e2121c1 [test] Update a couple of crasher signatures 2025-12-08 11:01:59 +00:00
Hamish Knight
b8a8a84615 [test] Remove a duplicate test 2025-12-08 11:01:59 +00:00
Pavel Yaskevich
e8b01842ca Merge pull request #85892 from xedin/fix-new-swiftui-test
[Tests] NFC: Restrict new SwiftUI to macOS
2025-12-08 00:11:00 -08:00
Pavel Yaskevich
8ac826b9ae [Tests] NFC: Restrict new SwiftUI to macOS
Frontend invocation targets macOS so attempting it on simulators
results in failures different from intended "too complex".
2025-12-07 15:44:26 -08:00
Hamish Knight
0068438385 [Parse] Fix buffer overrun in advanceIfMultilineDelimiter
Make sure we don't scan off the end of the buffer, and scan for the
delimiter before attempting the lookahead.
2025-12-07 20:05:43 +00:00
Slava Pestov
8da3b62d7b Merge pull request #85293 from slavapestov/too-complex-source-loc
Sema: Fix source location bookkeeping for 'reasonable time' diagnostic
2025-12-07 01:26:04 -05:00
Slava Pestov
d8cf185a13 Sema: Fix source location bookkeeping for 'reasonable time' diagnostic
We already had bookkeeping to track which statement in a multi-statement
closure we were looking at, but this was only used for the 'reasonable time'
diagnostic in the case that we hit the expression timer, which was almost
never hit, and is now off by default. The scope, memory, and trial limits
couldn't use this information, so they would always diagnose the entire
target being type checked.

Move it up from ExpressionTimer to ConstraintSystem, so that we get the
right source location there too. Also, factor out some code duplication
in BuilderTransform to ensure we get the same benefit for result builders
applied to function bodies too.
2025-12-06 20:31:08 -05:00
Slava Pestov
a99aebb712 Sema: Fix SolutionResult move constructor 2025-12-06 20:31:08 -05:00
AZero13
9fb56b8f8a Remove autorelease workaround for x86_64 (#85877)
LLVM no longer tail-calls this on x86_64, so we do not need an autorelease pool. Remove it for i386 as well as that is no longer a target for ObjC interop builds.
2025-12-06 11:28:03 -08:00
Egor Zhdan
21440b3fa9 Merge pull request #85867 from egorzhdan/egorzhdan/iterator-invalidation
[cxx-interop] Fix iterator invalidation
2025-12-06 18:31:05 +00:00
Max Desiatov
fb0ec64b2d Merge pull request #85835 from MaxDesiatov/embedded-wasm-mutex 2025-12-06 13:35:39 +00:00
Jamie
87aab10541 [test]: update existing tests for SingleValueExpr fixit 2025-12-06 05:18:24 -06:00
Jamie
8b591aecc9 [Sema]: add no_async_in_await fixit for SingleValueExpr too 2025-12-06 04:39:32 -06:00
Jamie
2c4e26b94f [test]: update existing tests for new fixit 2025-12-06 04:05:44 -06:00
Mike Ash
b4dedb2d83 Merge pull request #85880 from AZero13/nonatomic
swift_nonatomic_unknownObjectRelease should use swift_nonatomic_release
2025-12-06 02:05:59 -05:00