Commit Graph

153962 Commits

Author SHA1 Message Date
Nate Chandler
8c48ca2e8c [OpaqueValues] Addr-only consumes emit loadably. 2023-08-22 11:18:44 -07:00
Nate Chandler
b15b4a03f1 [Test] Deleted unused register. 2023-08-22 11:18:44 -07:00
Doug Gregor
e7a5887fec Merge pull request #68057 from DougGregor/fileprivate-extension-macros 2023-08-22 09:13:02 -07:00
Tristan Labelle
136642c167 Use llvm's abs_path_preserve_drive (#68038) 2023-08-22 09:10:29 -07:00
Slava Pestov
15c4822495 Merge pull request #68055 from slavapestov/rdar113943346
RequirementMachine: Fix potential 'pollution' from installing an invalid requirement machine
2023-08-22 08:56:04 -04:00
Michael Spencer
8501e1df81 Merge pull request #68052 from Bigcheese/dev/module.map-rename
[test] Rename all module.map files to module.modulemap
2023-08-21 22:01:57 -07:00
Doug Gregor
323561b157 [Macros] Use outermost source file for establishing (file)private access scope
Fixes rdar://114048069.
2023-08-21 22:01:19 -07:00
nate-chandler
1f05436a99 Merge pull request #68049 from nate-chandler/opaque-values/20230821/1/all-local-archetypes
[AddressLowering] Consider opening instructions of all local archetypes.
2023-08-21 20:55:25 -07:00
Slava Pestov
595a7a530b RequirementMachine: Fix potential 'pollution' from installing an invalid requirement machine
If the substitution terms of a concrete type symbol contain unresolved
name symbols, we have an invalid requirement that is dropped from the
minimized signature. In this case, the rewrite system used for minimization
cannot be installed as the official rewrite system for this generic
signature, because building a rewrite system from the signature will
produce a different result.

This might be the cause of the crash in rdar://114111159.
2023-08-21 23:36:37 -04:00
Mishal Shah
5ba4ce568b Merge pull request #68050 from compnerd/reset
utils: invoke `update-checkout` with `--reset-to-remote`
2023-08-21 16:46:07 -07:00
Alex Hoppen
8b7a76610b Merge pull request #67996 from ahoppen/ahoppen/remove-attrkinds-py
[Cleanup] Remove AttributeKinds.py
2023-08-21 15:59:34 -07:00
Michael Spencer
b2640e15e4 [test] Rename all module.map files to module.modulemap
`module.map` as a module map name has been discouraged since 2014, and
Clang will soon warn on its usage. This patch renames all instances of
`module.map` in the Swift tests to `module.modulemap` in preparation
for this change to Clang.

rdar://106123303
2023-08-21 15:58:59 -07:00
Alex Hoppen
baa20aec52 Merge pull request #67909 from nishithshah2211/imperative-fixits
[Diagnostics] Use imperative msg for protocol conformance & switch-case fixits
2023-08-21 14:40:21 -07:00
Pavel Yaskevich
4ba01733cd Merge pull request #67769 from xedin/rdar-113421273
[TypeChecker] InitAccessors: Fix default initialization of init accessor properties
2023-08-21 14:25:47 -07:00
Saleem Abdulrasool
20b921a1b0 utils: invoke update-checkout with --reset-to-remote
This should hopefully prevent unstaged change errors in CI.
2023-08-21 13:48:24 -07:00
Nate Chandler
efc9c6df10 [AddressLowering] Consider all local archetypes.
When determining where the "latest opening instruction" is, consider not
just `OpenedArchetypeType`s but any `LocalArchetypeType` which includes
`PackArchetypeType`s.
2023-08-21 13:46:11 -07:00
swift-ci
d5d11b6415 Merge pull request #68045 from slavapestov/chapter-21-completion
Updates to generics.tex
2023-08-21 13:44:54 -07:00
Artem Chikin
871118e827 Merge pull request #67928 from artemcm/DoNotCountOverlayDepsAsDirect
[Dependency Scanning] Remove Swift Overlay dependencies from the set of direct dependencies
2023-08-21 11:52:02 -07:00
Hamish Knight
535a5c67b6 Merge pull request #68037 from hamishknight/tracing-paper 2023-08-21 19:45:49 +01:00
Slava Pestov
a14175b37d Updates to generics.tex 2023-08-21 14:22:55 -04:00
Egor Zhdan
1f676071a1 Merge pull request #67865 from apple/egorzhdan/cfoptions
[cxx-interop] Import custom `NS_OPTIONS` correctly
2023-08-21 17:48:26 +01:00
Pavel Yaskevich
416bbaec8d [TypeChecker] InitAccessors: Fix handling of defaultable init accessor properties during default init synthesis
Default initializable init properties shouldn't prevent default
init synthesis and such properties without anything to initialize
should be considered by it.
2023-08-21 09:05:26 -07:00
Pavel Yaskevich
2149a4630a [DI] InitAccessors: Ignore unreachable blocks when check property initialization inside of an init accessor 2023-08-21 09:04:34 -07:00
Pavel Yaskevich
645e8df6bd [TypeChecker] InitAccessors: Synthesize default init for init accessor properties
Fixes a bug were default initializer for an init accessor property
hasn't been synthesized even when the property is marked as default
initializable.

Resolves: rdar://113421273
2023-08-21 09:04:34 -07:00
Pavel Yaskevich
1542bb5a71 Merge pull request #67763 from xedin/rdar-113412104
[DI] Properties with init accessors without "initializes" act as stored
2023-08-21 09:03:43 -07:00
Saleem Abdulrasool
2fab837914 Create WindowsToolchain.md
Add some documentation explaining the installed components and how the toolchain installation is structured.  Add some details about the packaging components.
2023-08-21 07:38:02 -07:00
Hamish Knight
7982e4bd7e [AST] Handle null in printDeclDescription
Sink down the null Decl printing into
`printDeclDescription` such that all callers
benefit from it.

This is an attempt at fixing at least the secondary
crash in rdar://113491294, it does not address the
underlying crash.
2023-08-21 15:35:16 +01:00
swift-ci
99a17e3601 Merge pull request #68035 from hamishknight/add-test
[test] Add test case for #60808
2023-08-21 06:13:49 -07:00
Hamish Knight
d2bf03e697 [test] Add test case for issue 60808 2023-08-21 12:00:12 +01:00
Doug Gregor
df2e2eee30 Merge pull request #68028 from DougGregor/supersede-pre-macro-expansion-implied-conformances
Always supersede conformances implied by pre-macro-expansion conformances
2023-08-20 21:41:36 -07:00
Michael Gottesman
924785f20c Merge pull request #68031 from gottesmm/pr-6ddb1c42655a8548ef91d3b239d11cb084ff7b6d
[consume-operator] Emit a better error message when failing to consume globals or escaping captures.
2023-08-20 21:22:41 -07:00
Michael Gottesman
361562aef5 [consume-operator] Emit a better error message when failing to consume globals or escaping captures.
Specifically, we previously emitted a "compiler doesn't understand error", so we
were always emitting an error appropriately. This just gives a better error
message saying instead that the compiler did understand what happened and that
one cannot apply consume to globals or escaping captures.

https://github.com/apple/swift/issues/67755
rdar://112561671
2023-08-20 18:59:37 -07:00
Saleem Abdulrasool
9f66d03996 Merge pull request #68023 from hjyamauchi/abspath
Fix some swift tests due to the substitute drive paths on Windows.
2023-08-20 11:15:45 -07:00
Doug Gregor
ab576b31a7 Always supersede conformances implied by pre-macro-expansion conformances
Pre-macro-expansion conformances are introduced at the point where an
attached extension macro is attached to a particular nominal type, and
can imply other conformances. Once the macro is expanded, they are
expected to be replaced by the real conformance from the extension
produced by the macro. This includes any other conformances that are
implied by that conformances. Ensure that the real conformance---and
every conformances it implies---are considered "better" than the
pre-expansion conformances.

Fixes a bug where we would pick the wrong (pre-expansion)
conformances, which would then fail to get fully type-checked prior to
serialization. This could accept invalid code that then crashed the
compiler, as in rdar://112916159.
2023-08-20 09:27:38 -07:00
Michael Gottesman
36d333cd0c Merge pull request #68024 from gottesmm/pr-41b9d05e5b76061c0db11b5507cf80af25fc6dbe
[silgen] Hide ManagedValue::forUnmanaged and rewrite all uses to use more specific APIs
2023-08-19 20:39:22 -07:00
Ben Barham
ec485ba433 Merge pull request #67954 from bnbarham/do-not-depend-on-stringmap-iteration
[Index] Write stdlib records in alphabetical order
2023-08-19 17:46:47 -07:00
Michael Gottesman
8cfb3d238f [silgen] Cleanup a few Cleanups dump output. 2023-08-19 14:11:44 -07:00
Michael Gottesman
7c5c548968 [silgen] Fix PartialDestroyPackCleanup dumping output to handle LimitWithinComponent to be nullptr. 2023-08-19 14:11:44 -07:00
Michael Gottesman
543063ef0e [silgen] Make ManagedValue::forUnmanaged private and change users to use other more specific APIs.
I have been doing this over the past couple of days in preparation for changing
ManagedValue to specify the type of scope its cleanup is connected to.
2023-08-19 14:11:44 -07:00
Michael Gottesman
104379adab [silgen] Rename SILGenFunction::emitManagedRetain -> emitManagedCopy.
This is an old API that should have been renamed a long time ago. It just kept
its early name due to inertia.
2023-08-19 14:11:44 -07:00
Allan Shortlidge
b234b79b31 Merge pull request #68021 from tshortli/experimental-lazy-typecheck
Frontend: Introduce -experimental-lazy-typecheck action
2023-08-19 09:30:10 -07:00
Saleem Abdulrasool
a994e62cba Merge pull request #68016 from compnerd/finder
SwiftCompilerSources: use `unsafeFlags` for header searches
2023-08-19 09:07:58 -07:00
Alejandro Alonso
d04d8c1c49 Merge pull request #68001 from Azoy/raw-deserialize
[Sema] Fix raw layout deserialization
2023-08-19 08:55:56 -07:00
Sophia Poirier
aec59f2f9c Merge pull request #67974 from sophiapoirier/global-static-data-race-safety
enforce under strict concurrency that globals and statics be either…
2023-08-19 08:28:02 -07:00
Alejandro Alonso
dadbbb4d02 Fix raw layout deserialization
Update raw_layout.swift
2023-08-18 20:36:27 -07:00
Ben Barham
5cdc7db420 [Index] Write stdlib records in alphabetical order
The order for writing records of the stdlib currently depends on
`StringMap` iteration (in a slightly roundabout manner). Sort these
alphabetically instead.
2023-08-18 19:38:26 -07:00
Hiroshi Yamauchi
d975ab3698 Fix some swift tests due to the substitute drive paths on Windows.
After
05d613ea93
17 tests started to fail on Windows when when the SOURCE_DIR is on a
substitute drive due to the path expansion difference.

This fixes 7 of these tests.
2023-08-18 17:57:47 -07:00
Pavel Yaskevich
594469abf1 Merge pull request #68013 from xedin/fix-directlyAt-in-locator-builder
[ConstraintSystem] Fix locator builder `directlyAt`
2023-08-18 17:49:32 -07:00
Pavel Yaskevich
05d77fac9a Merge pull request #68003 from 0o001/main
[Diagnostics] Fix error message typo
2023-08-18 17:20:45 -07:00
swift-ci
978395bc11 Merge pull request #62959 from meg-gupta/simplifycfgossapr3
Migrate simple and dominator based jump threading to OSSA
2023-08-18 17:18:10 -07:00