Commit Graph

192871 Commits

Author SHA1 Message Date
swift-ci
2deb2f9a87 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 22:17:53 -07:00
Kavon Farvardin
889baf7f2c Merge pull request #84411 from kavon/copyprop-onone
sil: provide ability to run CopyPropagation in -Onone
2025-09-19 22:09:59 -07:00
swift-ci
ce0f17aeac Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 21:35:40 -07:00
Henrik G. Olsson
7fcc72f108 Merge pull request #81859 from swiftlang/swiftify-inherit-imports
[MacrosOnImports][Swiftify] Copy module imports from clang node's module to its Swift macro SourceFile
2025-09-19 21:21:09 -07:00
swift-ci
7f143fc5d9 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 20:35:23 -07:00
Anthony Latsis
ac3339f2d7 Merge pull request #84127 from swiftlang/jepa-main3
[presets] Add a special preset for Amazon Linux 2
2025-09-20 04:17:41 +01:00
swift-ci
21f73fd64c Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 20:16:04 -07:00
QuietMisdreavus
40690aa67f [SymbolGraphGen/Tests] require StringProcessing in the Macros test (#84406)
This test implicitly loads `_StringProcessing`; add that to the
requirements of this test so that is correctly reflected.

Resolves rdar://158821486
2025-09-19 20:12:27 -07:00
swift-ci
190c612dbf Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 19:57:32 -07:00
nate-chandler
6cd7974c5a Merge pull request #84405 from nate-chandler/rdar160692694
[DiagnoseStaticExclusivity] Fix this assertion.
2025-09-19 19:37:50 -07:00
swift-ci
17fad898c2 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 19:35:42 -07:00
Slava Pestov
0730b91205 Merge pull request #84401 from slavapestov/one-more-monoid-benchmark-fix
Fix a slightly non-deterministic behavior in the Monoids benchmark
2025-09-19 22:34:57 -04:00
swift-ci
0292981879 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 16:35:25 -07:00
Alexis Laferrière
97002e1ee0 Merge pull request #84373 from xymus/le-import-warn
Sema: Limit errors on LE importing non-LE modules to SDK modules
2025-09-19 16:34:48 -07:00
Kavon Farvardin
4a943d464d sil: provide ability to run CopyPropagation in -Onone
This does not enable it by default. Use either of the flags:

```
-enable-copy-propagation
-enable-copy-propagation=always
```

to enable it in -Onone. The previous frontend flag
`-enable-copy-propagation=true` has been renamed to
`-enable-copy-propagation=optimizing`, which is currently default.

rdar://107610971
2025-09-19 16:23:19 -07:00
Henrik G. Olsson
edb48dff8c [ImportResolution] Gracefully handle importing broken clang module
An assert checking the invariant of the module passed to
alreadyImportedTLM being a top-level module would dereference a null
pointer in the case where the clang module contained syntax errors,
since findUnderlyingClangModule would return null. Instead call the
bespoke isSubmodule function that already performs this null check.

This fixes the lldb test
lldb/test/API/lang/swift/clangimporter/expr_import/TestSwiftExprImport.py.
2025-09-19 15:49:44 -07:00
swift-ci
338191240e Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 15:37:11 -07:00
Saleem Abdulrasool
76f44fe860 Merge pull request #84360 from speednoisemovement/htiming
build.ps1: make time summary hierarchical
2025-09-19 15:27:39 -07:00
swift-ci
9be21897d9 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 15:20:12 -07:00
Hamish Knight
801cd646ad Merge pull request #84390 from hamishknight/out-of-place
[Sema] Reject placeholders in type resolution for param and result types
2025-09-19 23:19:48 +01:00
swift-ci
e61c65951b Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 14:36:30 -07:00
Gábor Horváth
ac26e286fc Merge pull request #84321 from Xazax-hun/unbalanced-refcount-in-pods
[cxx-interop] Fix over-releasing reference members of trival C++ types
2025-09-19 23:23:08 +02:00
swift-ci
647f66ad2b Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 14:18:04 -07:00
Slava Pestov
21e34e3189 Merge pull request #84400 from slavapestov/prepared-overloads-flag
Sema: Add -solver-{enable,disable}-prepared-overloads frontend flags
2025-09-19 17:13:23 -04:00
Slava Pestov
575c7097f6 Fix a slightly non-deterministic behavior in the Monoids benchmark
When built with output enabled, sometimes a few lines would be
interchanged, depending on the order in which parallel tasks
complete. Simplify the dispatcher logic a bit to ensure we get
the same output ordering every time.

This does not impact the running time of the benchmark.
2025-09-19 17:07:10 -04:00
swift-ci
cb01e49f6c Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 13:58:50 -07:00
Anton Korobeynikov
e6409d7d9d Correctly handle multiple semantic results for autodiff subset differential thunks (#84366)
Fixes https://github.com/swiftlang/swift/issues/84365
2025-09-19 13:54:30 -07:00
swift-ci
80f659cce2 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 12:18:05 -07:00
fahadnayyar
7b8b33eda0 [cxx-interop] Allow SWIFT_RETURNS_(UN)RETAINED on template class member functions returning T* (#84375)
When importing C++ template classes like`Ref<T>` that have methods
returning `T*`, we face the following situation when `T` is a
`SWIFT_SHARED_REFERENCE` type:

1. Without `SWIFT_RETURNS_(UN)RETAINED` annotation: Swift compiler would
emit a warning (currently under experimental-feature flag
`WarnUnannotatedReturnOfCxxFrt`) _"cannot infer the ownership of the
returned value" when T is a SWIFT_SHARED_REFERENCE type_
2. With annotation: Compiler rejects it with this error: _"cannot be
annotated... not returning a SWIFT_SHARED_REFERENCE type"_

This affects WebGPU's smart pointer types (`WTF::Ref<T>,
WTF::RefPtr<T>`) and similar patterns in other C++ codebases.

In this patch I am fixing the logic for diagnostic
`returns_retained_or_returns_unretained_for_non_cxx_frt_values`. I'm
also making it a warning instead of an error to minimize the risk, as
this diagnostic has been a hindrance to the adoption of these
annotations in real codebases when templated functions and types are
involved. (Refer to
[PR-78968](https://github.com/swiftlang/swift/pull/78968))

rdar://160862498
2025-09-19 12:09:05 -07:00
Nate Chandler
edf41ceff6 [DiagnoseStaticExclusivity] Fix this assertion.
This function is called in one place in an assertion.  It asserts that
the function in question is the stdlib's swap.  In language mode 6, the
called value may be wrapped in a `function_conversion_expr` for
`@Sendable`.  That's irrelevant for the purposes of this assertion, so
look through such conversions.

rdar://160692694
2025-09-19 11:47:31 -07:00
swift-ci
44f9f48faa Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 11:24:27 -07:00
Hamish Knight
45a9f3aed8 Merge pull request #84394 from hamishknight/pre-fuzzy
[test] Fix up crasher test names
2025-09-19 19:08:53 +01:00
swift-ci
3a31109821 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 10:35:08 -07:00
Anthony Latsis
fd60697c8f [presets] Add a special preset for Amazon Linux 2
This preset inherits from buildbot_linux, the preset currently used to
build on AL2. Additionally, it:
* Disables sourcekit-lsp testing. We do not expect people to be using
  AL2 as a Swift development platform at this point, and some
  sourcekit-lsp tests fail only on AL2.
* Disables LLDB testing and Python scripting support for LLDB. The
  Python requirement for both is too high for AL2.
2025-09-19 18:22:03 +01:00
Anthony Latsis
b7b4b57799 Merge pull request #84391 from swiftlang/jepa-main5
tools: Set Swift bug report message in some executable targets
2025-09-19 18:15:20 +01:00
swift-ci
0f20b54db7 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 10:14:16 -07:00
Nate Cook
80f052e251 [stdlib] Switch to a linear-space variant of Myers diffing (#83212)
This changes the implementation for `Collection.difference(from:)` to
use a linear-space complexity variation of the same Myers algorithm. The
new version is similar in execution time to the existing one, but should
alleviate memory pressure when diffing collections where the number of
differences approaches the size of the collection. While the new
algorithm returns a set of changes that is the same size as the previous
version, the specific changes are not guaranteed to be the same.

rdar://155829876
2025-09-19 10:03:26 -07:00
Gabor Horvath
e4e54236ca [cxx-interop] Fix over-releasing reference members of trival C++ types
Large trivial types were copied via memcpy instead of doing a field-wise
copy. This is incorrect for types with reference fields where we also
need to bump the corresponding refcounts.

rdar://160315343
2025-09-19 14:28:33 +01:00
Hamish Knight
0b3747d7c4 Revert "[CS] Record fix when encountering decl reference with placeholder type"
This reverts commit 8102e39f39.
2025-09-19 14:22:39 +01:00
Hamish Knight
62798494ff Revert "[Sema] Handle PlaceholderTypes in associated type inference"
This reverts commit aa9aa58cea.
2025-09-19 14:22:39 +01:00
Hamish Knight
46df852610 [Sema] Reject placeholders in type resolution for param and result types
Not all clients can properly handle the presence of placeholders in
interface types and it doesn't seem worth the complexity for the 
type replacement diagnostic.
2025-09-19 14:22:39 +01:00
Hamish Knight
b39dfdf416 [AST] Upgrade interface type assertions 2025-09-19 14:22:39 +01:00
Hamish Knight
2769b3398b [test] Update a couple of crasher signatures 2025-09-19 13:13:00 +01:00
Hamish Knight
54ff7b339c [test] Fix up crasher test names
Turns out my code for this has been wrong all this time and hasn't
been been including leading zeros for each hex byte.
2025-09-19 13:11:53 +01:00
Anthony Latsis
ea5d89d0d0 tools: Set Swift bug report message in some executable targets
If these programs crash, we want them to print the Swift bug report
message, not the default LLVM one, which leads to
https://github.com/llvm/llvm-project/issues.

While here, hoist the setting of the bug report message to the
START_PROGRAM macro so that we don't forget to set it in the future.
2025-09-19 12:05:31 +01:00
swift-ci
e7eb500826 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 01:14:59 -07:00
Doug Gregor
3e981b7d8f Merge pull request #84374 from DougGregor/embedded-swift-restrictions
Embedded swift restrictions
swift-DEVELOPMENT-SNAPSHOT-2025-09-19-a
2025-09-19 01:09:19 -07:00
swift-ci
8c53bda40a Merge remote-tracking branch 'origin/main' into rebranch 2025-09-18 23:39:34 -07:00
Kavon Farvardin
dbc93c5372 Merge pull request #84383 from kavon/manual-ownership-2
test: add more ManualOwnership coverage
2025-09-18 22:23:23 -07:00
swift-ci
fb3ebeb836 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-18 21:34:47 -07:00