Commit Graph

195786 Commits

Author SHA1 Message Date
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
Alexis Laferrière
1fd44e67a2 Sema: Allow refs to hidden dependencies in prorperties of non-open classes
We now report properties referencing types imported from
implementation-only dependencies in non-library-evolution mode as the
memory layouts of structs and enums may be exposed to clients. Here we
exempt non-open classes from this check as clients hold pointers to
classes which hides the class internal memory layouts. Keep forbidding
it for open classes in order to error early, a client trying to subclass
an open class with such a reference from their property would already
see an error about members not deserializable.
2025-12-08 16:39:16 -08: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
Augusto Noronha
52c8b7975a [NFC][RemoteInspection] Use existing cache to build conformance table
There is an existing cache which is built when looking up
FieldDescriptors. collectAllConformances ignored this cache and would
parse every FieldDescriptor again. Use the existing cache mechanism.

rdar://166098516
2025-12-08 16:34:45 -08:00
Arnold Schwaighofer
d06929ccd2 [embedded] Add support for some foreign metadata 2025-12-08 15:35:43 -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
Dario Rexin
0fdca11e46 [IRGen] Use proper linkage for async function pointers to partial apply forwarders
rdar://163631865

Under certain circumstances the same symbol can be used for different implementations of the forwarders.
The forwarders themselves are already emitted with "internal" LLVM linkage, but some particularities in
the mapping from SILLinkage to LLVM linkage caused async function pointers to partial apply forwarders
to be emitted with linkonce_odr instead, which caused the wrong forwarder to be called at runtime, causing
unexpected behavior and crashes.
2025-12-08 11:30:22 -08: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
563ba95a7d Sema: Move definition of hasConversions() before its first use 2025-12-08 10:12:13 -05:00
Slava Pestov
db4e3b0838 Sema: Move definition of checkTypeOfBinding() before its first use 2025-12-08 10:12:13 -05:00
Slava Pestov
2eebdc3bb5 Sema: Simplify addLiteralRequirement() and fix misleading comment
Literal coverage is actually checked elsewhere, so this was
about whether the protocol has a default type only.
2025-12-08 10:12:13 -05:00
Slava Pestov
f4dabfb889 Sema: checkTypeOfBinding() should return a bool
This always returned a std::nullopt, or an optional of the given 'type'.
2025-12-08 10:12:13 -05:00
Slava Pestov
0fabf82ace Sema: Fix assert failure with non-representative type variable in contractEdges() 2025-12-08 10:12:12 -05: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
Saleem Abdulrasool
070916fef3 DriverTool: adjust argv[0] scanning for CAS
Ensure that we nativize the path and consider only the filename starting
prefix to account for file suffixes (e.g. `.exe` on Windows). This
ensures that we properly support other platforms.
2025-12-08 08:53:26 -06:00
Fabroce de Gans
29eecbe5d5 utils: Update the bootstrap Windows toolchain
The current Windows arm64 bootstrap toolchain is not functional.
2025-12-08 15:34:17 +01: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
2ce62d0ffe [update-checkout] add the 'status' subcommand 2025-12-08 11:45:36 +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
Tim Kientzle
8393f0639c Minor perf tweak 2025-12-08 08:02:49 +00:00
Tim Kientzle
fa0aa7506b Avoid un unnecessary bounds check 2025-12-08 07:39:09 +00:00
Tim Kientzle
7833b8426d Enable extern 2025-12-08 07:38:26 +00: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
Tim Kientzle
73fee7fb26 Update comments 2025-12-07 13:21:28 +00:00
Tim Kientzle
2c9227e4c8 Update comments 2025-12-07 13:20:49 +00:00
Tim Kientzle
16920b200b Revert "Express the core parser functions as initializers"
After further thought, I realize that it makes more sense
to keep the public API in FloatingPointParsing.swift.gyb
(where we can consolidate the repetitive doc comments)
and have this as a purely internal set of service functions.

This reverts commit 7084ab8e6e.
2025-12-07 10:21:44 +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