Commit Graph

7628 Commits

Author SHA1 Message Date
swift-ci
f7d72cb78f Merge remote-tracking branch 'origin/main' into rebranch 2024-09-20 05:14:28 -07:00
Erik Eckstein
60e7346b87 tests: re-enable SILOptimizer/string_switch.swift
And fix the check lines.

(the test was disabled in https://github.com/swiftlang/swift/pull/76592)

rdar://136304425
2024-09-20 09:30:30 +02:00
swift-ci
6053b50742 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-19 21:34:21 -07:00
Mishal Shah
5fb9583f0c Merge pull request #76592 from nate-chandler/rdar136304425
[Test] Disable test blocking Linux PR testing.
2024-09-19 21:24:17 -07:00
swift-ci
4b00b512c1 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-19 21:14:03 -07:00
nate-chandler
01157bf292 Merge pull request #76578 from nate-chandler/rdar136267186
[Test] Add regression test.
2024-09-19 21:08:29 -07:00
Nate Chandler
9b00df3ba0 [Test] Disable test blocking Linux PR testing.
rdar://136304425
2024-09-19 17:37:39 -07:00
Tim Kientzle
025143138d Update an existing test that now works 2024-09-19 16:25:41 -07:00
Tim Kientzle
e62560c9ca Limit this part to only 64-bit targets 2024-09-19 14:04:11 -07:00
Tim Kientzle
da5383c4c3 Better support CoreFoundation types in RemoteMirror
This plugs a hole where we failed to recognize a CF type when it
appeared as the payload of an enum stored as a property.  Curiously,
RemoteMirror is able to reflect this when the enum appears by itself,
just not when it's stored as a property.

The simplest fix is to hook into the TypeInfo calculation which
computes a TypeInfo (basically, the tree of fields) from a TypeRef
(basically, the name of the type, including generic context).
Specifically, we sometimes end up here with a "type alias" that
none of the lookup support seems to be able to handle.  Fortunately,
these aliases demangle into a pretty predictable shape, so this
just pattern-matches the specific demangle tree shape to recognize
these as "type aliases in the `__C` module whose name starts with `CF`
and ends with `Ref`".

Resolves rdar://82465109
2024-09-19 13:50:41 -07:00
Nate Chandler
653d7b36e0 [Test] Add regression test.
For rdar://136267186 .
2024-09-19 11:29:13 -07:00
swift-ci
dbad48cb7f Merge remote-tracking branch 'origin/main' into rebranch 2024-09-17 08:55:31 -07:00
Pavel Yaskevich
afcf38e76d Merge pull request #76487 from xedin/fix-invalid-binding-elision
[CSBindings] Prevent `BindingSet::isViable` from dropping viable bindings
2024-09-17 08:44:20 -07:00
swift-ci
17d5ec2432 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-17 00:15:49 -07:00
Meghana Gupta
e6fc5c2e6d Delete SWIFT_ENABLE_EXPERIMENTAL_NONESCAPABLE_TYPES flag 2024-09-16 14:08:16 -07:00
Ben Barham
a7b50f357f Merge remote-tracking branch 'origin/main' into manual-main-merge
Conflicts:
  - `lib/Driver/ToolChains.cpp` conflicting with the `addAllArgs` rename
    for multiple options
2024-09-16 13:53:18 -07:00
Pavel Yaskevich
2c9d05991f [CSBindings] Prevent BindingSet::isViable from dropping viable bindings
I think the original idea was to elide `Array<$T>` if there is
a binding a resolved generic arguments i.e. `Array<Float>`, but
the check doesn't account for the fact that bindings could be
of different kinds and there are some implicit conversions that
could be missed if we remove the bindings.

For example, given the following constraints:

`Array<$T0> conv $T1`
`$T1 conv Array<(String, Int)>`

`$T0` can be a supertype of `Array<$T0>` and subtype of `Array<(String, Int)>`.

The solver should accept both types as viable bindings because the
`$T0` could be bound to `(key: String, value: Int)` and that would
match `Array<(String, Int)>` conversion.
2024-09-16 09:54:12 -07:00
Slava Pestov
6fb66db6da Merge pull request #76318 from slavapestov/favored-over-disjunction-heuristic
Sema: Generalize heuristic in favoredOverDisjunction()
2024-09-14 08:45:09 -04:00
Pavel Yaskevich
c49aeaf177 Merge pull request #76354 from xedin/improve-mismatch-diagnostics-in-optional-context
[CSSimplify] Rework how/when mismatches between optional types are fixed
2024-09-11 10:14:19 -07:00
Pavel Yaskevich
55b8d9538d [CSSimplify] Rework how/when mismatches between optional types are fixed
- Don't attempt to insert fixes if there are restrictions present, they'd inform the failures.

  Inserting fixes too early doesn't help the solver because restriction matching logic would
  record the same fixes.

- Adjust impact of the fixes.

  Optional conversions shouldn't impact the score in any way because
  they are not the source of the issue.

- Look through one level of optional when failure is related to optional injection.

  The diagnostic is going to be about underlying type, so there is no reason to print
  optional on right-hand side.
2024-09-10 10:35:05 -07:00
Jan
6236b258d2 [Sema] Fixes for mutability handling in property wrappers (#76357)
Prevents a crash when a parameter references an invalid property wrapper. The original code assumed that mutability information would always be available, but this assumption fails when the property wrapper is invalid

Resolves https://github.com/swiftlang/swift/issues/65640
2024-09-10 00:20:29 -07:00
Slava Pestov
73aa029a8b Sema: Generalize heuristic in favoredOverDisjunction() 2024-09-09 11:18:58 -04:00
swift-ci
faf388d87d Merge remote-tracking branch 'origin/main' into rebranch 2024-09-08 20:35:18 -07:00
Hamish Knight
ee0e408a8c [Sema] Remove separate closure type-checking logic
`participatesInInference` is now always true for
a non-empty body, remove it along with the separate
type-checking logic such that empty bodies are
type-checked together with the context.
2024-09-08 16:17:11 +01:00
Hamish Knight
72fe29f7f4 [CS] Add custom diagnostic for missing result builder element
If we have a single missing argument for an empty
`buildBlock` call, emit a custom diagnostic.
2024-09-08 16:17:11 +01:00
swift-ci
577e000cf9 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-05 12:15:20 -07:00
Allan Shortlidge
c04736f75f Merge pull request #76276 from tshortli/remove-valid-triples-for-zippering-assertion
SILGen: Remove triplesAreValidForZippering() assert
2024-09-05 12:03:06 -07:00
Allan Shortlidge
4c3a009c2b SILGen: Remove triplesAreValidForZippering() assert.
This assert was correctly catching the fact that `-target-variant` is not being
normalized at the same time as `-target` when building arm64e modules from
swiftinterface. That should be fixed, but at the moment it isn't causing any
concrete harm and the assertion fails when building against the SDKs included
with the latest Xcode 16 betas.

Resolves rdar://133020098.
2024-09-04 22:39:21 -07:00
swift-ci
b29ebad446 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-04 12:04:17 -07:00
Slava Pestov
a3c0e225a7 Merge pull request #76238 from slavapestov/existential-signature-rework-part-3
Allow type variables to appear inside opened existential archetypes
2024-09-04 14:53:18 -04:00
swift-ci
a58ebac7f0 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-04 09:34:28 -07:00
Pavel Yaskevich
f9e08bc6ec Merge pull request #76174 from xedin/remodel-constraint-generation-for-assignment
[ConstraintSystem] Introduce `LValueObject` constraint to replace direct l-value assignments
2024-09-04 09:27:59 -07:00
Slava Pestov
5a43d2403e Sema: Simplify opened existential types in solution 2024-09-04 10:42:19 -04:00
swift-ci
e092119807 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-04 07:14:03 -07:00
Hamish Knight
3b0d692b30 [test] Restrict complete_sdk_platform.swift to macOS
rdar://135232586
2024-09-04 10:26:23 +01:00
swift-ci
5116eda564 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-03 16:14:13 -07:00
Hamish Knight
142daacd61 [test] Re-enable expectation in complete_sdk_platform.swift
rdar://134963605
2024-09-03 18:40:51 +01:00
swift-ci
a4cffa96e4 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-03 10:34:34 -07:00
Hamish Knight
350c1ce771 Merge pull request #76222 from hamishknight/xfactor
[test] NFC: Factor out `%xcode-extra-platform-search-paths`
2024-09-03 18:21:39 +01:00
Hamish Knight
4f1bebf598 [test] NFC: Factor out %xcode-extra-platform-search-paths 2024-09-03 14:19:59 +01:00
swift-ci
0a19be5d95 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-03 04:34:14 -07:00
Erik Eckstein
6c46d03601 tests: reduce the timeout of SILOptimizer/large_nested_array.swift.gyb again
It turns out that some CI jobs need 5-6 minutes for this test. To give some slack, use a timeout of 10 minutes.

This is a follow-up of https://github.com/swiftlang/swift/pull/76146
2024-09-03 09:26:31 +02:00
swift-ci
bc515098a3 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-30 22:14:01 -07:00
nate-chandler
9ee877943e Merge pull request #76186 from nate-chandler/rdar133779160
[ODL] Handle builtins.
2024-08-30 21:54:08 -07:00
Nate Chandler
5d9802f25f [ODL] Handle builtins.
No update is needed for the values they produce.  This pass should
really be refactored not to crash on instructions that aren't explicitly
listed or at least not to compile if not every instruction is listed.

rdar://133779160
2024-08-30 16:09:11 -07:00
Pavel Yaskevich
dab01bc1fe [Tests] NFC: Update some of the changed/improved tests 2024-08-30 15:39:25 -07:00
swift-ci
3c49138928 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-29 18:34:15 -07:00
Hamish Knight
17b143cd99 Merge pull request #76156 from hamishknight/fix-test
[test] Temporarily remove a check from complete_sdk_platform.swift
2024-08-30 02:23:36 +01:00
swift-ci
229f81a516 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-29 14:34:05 -07:00
Ben Langmuir
d94bce7355 Merge pull request #76027 from benlangmuir/explicit-targets
[test] Add explicit targets to tests depending on the default
2024-08-29 14:25:05 -07:00