Skip to content

Commit 417c643

Browse files
Merge pull request #4653 from swiftwasm/katei/merge-main-2022-06-18
Merge main 2022-06-18
2 parents ca4a9f9 + 5de2df0 commit 417c643

File tree

255 files changed

+5294
-957
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+5294
-957
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,17 @@ to track the status of our builds, please refer to our [GitHub Actions page](htt
2323
# Swift Programming Language
2424

2525

26-
| | **Architecture** | **main** | **Package** |
27-
|---|:---:|:---:|:---:|
28-
| **macOS** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-macos/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-macos)|[![Build Status](https://ci.swift.org/job/oss-swift-package-macos/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-macos)|
29-
| **Ubuntu 18.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-18_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-18_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-18_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-18_04)|
30-
| **Ubuntu 20.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04)|
31-
| **CentOS 7** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-package-centos-7/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-centos-7)|[![Build Status](https://ci.swift.org/job/oss-swift-package-centos-7/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-centos-7)|
32-
| **Amazon Linux 2** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2)|[![Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2)|
26+
| | **Architecture** | **Build** |
27+
|---|:---:|:---:|
28+
| **macOS** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-macos/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-macos)|
29+
| **Ubuntu 18.04** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-18_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-18_04)|
30+
| **Ubuntu 20.04** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04)|
31+
| **Ubuntu 20.04** | AArch64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64)|
32+
| **Ubuntu 22.04** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04)|
33+
| **Ubuntu 22.04** | AArch64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04-aarch64/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04-aarch64)|
34+
| **CentOS 7** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-centos-7/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-centos-7)|
35+
| **Amazon Linux 2** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2)|
36+
| **Amazon Linux 2** | AArch64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2-aarch64/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2-aarch64)|
3337

3438
**Swift Community-Hosted CI Platforms**
3539

SwiftCompilerSources/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ function(add_swift_compiler_modules_library name)
7575

7676
set(swift_compile_options
7777
"-Xfrontend" "-validate-tbd-against-ir=none"
78-
"-Xfrontend" "-enable-cxx-interop"
78+
"-Xfrontend" "-enable-experimental-cxx-interop"
7979
"-Xcc" "-UIBOutlet" "-Xcc" "-UIBAction" "-Xcc" "-UIBInspectable")
80+
if (NOT BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS")
81+
list(APPEND swift_compile_options "-Xfrontend" "-disable-implicit-string-processing-module-import")
82+
endif()
8083

8184
if(CMAKE_BUILD_TYPE STREQUAL Debug)
8285
list(APPEND swift_compile_options "-g")

SwiftCompilerSources/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ private extension Target {
1717
static let defaultSwiftSettings: [SwiftSetting] = [
1818
.unsafeFlags([
1919
"-Xfrontend", "-validate-tbd-against-ir=none",
20-
"-Xfrontend", "-enable-cxx-interop",
20+
"-Xfrontend", "-enable-experimental-cxx-interop",
2121
// Bridging modules and headers
2222
"-Xcc", "-I", "-Xcc", "../include",
2323
"-cross-module-optimization"

SwiftCompilerSources/Sources/SIL/BasicBlock.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ final public class BasicBlock : ListNode, CustomStringConvertible, HasShortDescr
2525
public var function: Function { SILBasicBlock_getFunction(bridged).function }
2626

2727
public var description: String {
28-
String(_cxxString: SILBasicBlock_debugDescription(bridged))
28+
let stdString = SILBasicBlock_debugDescription(bridged)
29+
return String(_cxxString: stdString)
2930
}
3031
public var shortDescription: String { name }
3132

SwiftCompilerSources/Sources/SIL/Function.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ final public class Function : CustomStringConvertible, HasShortDescription {
2121
}
2222

2323
final public var description: String {
24-
String(_cxxString: SILFunction_debugDescription(bridged))
24+
let stdString = SILFunction_debugDescription(bridged)
25+
return String(_cxxString: stdString)
2526
}
2627

2728
public var shortDescription: String { name.string }

SwiftCompilerSources/Sources/SIL/GlobalVariable.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ final public class GlobalVariable : CustomStringConvertible, HasShortDescription
1919
}
2020

2121
public var description: String {
22-
String(_cxxString: SILGlobalVariable_debugDescription(bridged))
22+
let stdString = SILGlobalVariable_debugDescription(bridged)
23+
return String(_cxxString: stdString)
2324
}
2425

2526
public var shortDescription: String { name.string }

SwiftCompilerSources/Sources/SIL/Instruction.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public class Instruction : ListNode, CustomStringConvertible, Hashable {
3838
final public var function: Function { block.function }
3939

4040
final public var description: String {
41-
String(_cxxString: SILNode_debugDescription(bridgedNode))
41+
let stdString = SILNode_debugDescription(bridgedNode)
42+
return String(_cxxString: stdString)
4243
}
4344

4445
final public var operands: OperandArray {
@@ -142,7 +143,8 @@ public class SingleValueInstruction : Instruction, Value {
142143

143144
public final class MultipleValueInstructionResult : Value {
144145
final public var description: String {
145-
String(_cxxString: SILNode_debugDescription(bridgedNode))
146+
let stdString = SILNode_debugDescription(bridgedNode)
147+
return String(_cxxString: stdString)
146148
}
147149

148150
public var instruction: Instruction {

SwiftCompilerSources/Sources/SIL/Value.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ public enum Ownership {
8181

8282
extension Value {
8383
public var description: String {
84-
String(_cxxString: SILNode_debugDescription(bridgedNode))
84+
let stdString = SILNode_debugDescription(bridgedNode)
85+
return String(_cxxString: stdString)
8586
}
8687

8788
public var uses: UseList {

docs/ABI/Mangling.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ Entities
349349
entity-spec ::= 'fE' // ivar destroyer; untyped
350350
entity-spec ::= 'fe' // ivar initializer; untyped
351351
entity-spec ::= 'Tv' NATURAL // outlined global variable (from context function)
352+
entity-spec ::= 'Tv' NATURAL 'r' // outlined global read-only object
352353
entity-spec ::= 'Te' bridge-spec // outlined objective c method call
353354

354355
entity-spec ::= decl-name label-list function-signature generic-signature? 'F' // function

docs/HowToGuides/GettingStarted.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ In project settings, locate `Build, Execution, Deployment > CMake`. You will nee
376376
- `-D SWIFT_PATH_TO_CMARK_BUILD=SOME_PATH/swift-project/build/Ninja-RelWithDebInfoAssert/cmark-macosx-arm64 -D LLVM_DIR=SOME_PATH/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-arm64/lib/cmake/llvm -D Clang_DIR=SOME_PATH/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-arm64/lib/cmake/clang -D CMAKE_BUILD_TYPE=RelWithDebInfoAssert -G Ninja -S .`
377377
- replace the `SOME_PATH` to the path where your `swift-project` directory is
378378
- the CMAKE_BUILD_TYPE should match the build configuration name, so if you named this profile `RelWithDebInfo` the CMAKE_BUILD_TYPE should also be `RelWithDebInfo`
379+
- **Note**: If you're using an intel machine to build swift, you'll need to replace the architecture in the options. (ex: `arm64` with `x86_64`)
379380
380381
With this done, CLion should be able to successfully import the project and have full autocomplete and code navigation powers.
381382

docs/HowToGuides/SettingUpLSPEmacs.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# How to setup LSP + Emacs as a C++ IDE for Swift
2+
3+
This document describes how to setup a new emacs installation to use LSP and
4+
other modes to create a C++ IDE for working on the compiler code base. It
5+
enables autocompletion, lookup API at point, as well as formatting, renaming,
6+
and syntax highlighting.
7+
8+
## Setting up Package.el for MELPA
9+
10+
Before we do anything, we need to setup package.el so we can grab packages from
11+
[https://melpa.org/](MELPA) and GNU. This can be done by
12+
including the below in your elisp startup file. Make sure it is run before any
13+
other code is run.
14+
15+
```
16+
(require 'package)
17+
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
18+
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/") t)
19+
(package-initialize)
20+
```
21+
22+
## Download packages
23+
24+
The packages needed as of this document being written (Jun 2022) are:
25+
26+
* use-package
27+
* company
28+
* lsp-mode
29+
* lsp-ui
30+
* helm-lsp
31+
* lsp-treemacs
32+
33+
One can install these by running the command `package-install` inside emacs.
34+
35+
## Configuring LSP
36+
37+
Finally, now we need to configure out installation so everything is setup
38+
correctly. This can be done by including the following in ones .emacs:
39+
40+
```
41+
(use-package company
42+
:ensure t
43+
:config
44+
;; Enable completion-as-you-type behavior.
45+
;; don't add any dely before trying to complete thing being typed
46+
;; the call/response to gopls is asynchronous so this should have little
47+
;; to no affect on edit latency
48+
(setq company-idle-delay 0.1)
49+
;; start completing after a single character instead of 3
50+
(setq company-minimum-prefix-length 1)
51+
;; align fields in completions
52+
(setq company-tooltip-align-annotations t)
53+
)
54+
(use-package lsp-mode
55+
:ensure t
56+
:commands (lsp lsp-deferred)
57+
:hook (c-mode-common . lsp)
58+
:custom
59+
;; Prevent lsp from inserting header decorators.
60+
(lsp-clients-clangd-args '("--header-insertion-decorators=0" "--header-insertion=never"))
61+
:init
62+
;; Enable easy local renaming using LSP
63+
(bind-key "C-x l" 'lsp-rename)
64+
:config
65+
;; The CAPF back-end provides a bridge to the standard
66+
;; completion-at-point-functions facility, and thus works with any major mode
67+
;; that defines a proper completion function.
68+
(setq lsp-completion-provider :capf)
69+
(add-hook 'go-mode-hook #'lsp-go-install-save-hooks))
70+
71+
(use-package lsp-ui :commands lsp-ui-mode)
72+
(use-package helm-lsp :commands helm-lsp-workspace-symbol
73+
:config
74+
(define-key lsp-mode-map [remap xref-find-apropos] #'helm-lsp-workspace-symbol))
75+
(use-package lsp-treemacs :commands lsp-treemacs-errors-list)
76+
```

include/swift/ABI/MetadataValues.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,7 @@ class ExtendedExistentialTypeShapeFlags {
899899
SpecialKind getSpecialKind() const {
900900
return SpecialKind((Data & SpecialKindMask) >> SpecialKindShift);
901901
}
902+
bool isOpaque() const { return getSpecialKind() == SpecialKind::None; }
902903
bool isClassConstrained() const {
903904
return getSpecialKind() == SpecialKind::Class;
904905
}

include/swift/AST/ASTContext.h

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,13 @@ class ASTContext final {
223223
ASTContext(const ASTContext&) = delete;
224224
void operator=(const ASTContext&) = delete;
225225

226-
ASTContext(LangOptions &langOpts, TypeCheckerOptions &typecheckOpts,
227-
SILOptions &silOpts, SearchPathOptions &SearchPathOpts,
228-
ClangImporterOptions &ClangImporterOpts,
229-
symbolgraphgen::SymbolGraphOptions &SymbolGraphOpts,
230-
SourceManager &SourceMgr, DiagnosticEngine &Diags);
226+
ASTContext(
227+
LangOptions &langOpts, TypeCheckerOptions &typecheckOpts,
228+
SILOptions &silOpts, SearchPathOptions &SearchPathOpts,
229+
ClangImporterOptions &ClangImporterOpts,
230+
symbolgraphgen::SymbolGraphOptions &SymbolGraphOpts,
231+
SourceManager &SourceMgr, DiagnosticEngine &Diags,
232+
std::function<bool(llvm::StringRef, bool)> PreModuleImportCallback = {});
231233

232234
public:
233235
// Members that should only be used by ASTContext.cpp.
@@ -238,11 +240,13 @@ class ASTContext final {
238240

239241
void operator delete(void *Data) throw();
240242

241-
static ASTContext *get(LangOptions &langOpts, TypeCheckerOptions &typecheckOpts,
242-
SILOptions &silOpts, SearchPathOptions &SearchPathOpts,
243-
ClangImporterOptions &ClangImporterOpts,
244-
symbolgraphgen::SymbolGraphOptions &SymbolGraphOpts,
245-
SourceManager &SourceMgr, DiagnosticEngine &Diags);
243+
static ASTContext *
244+
get(LangOptions &langOpts, TypeCheckerOptions &typecheckOpts,
245+
SILOptions &silOpts, SearchPathOptions &SearchPathOpts,
246+
ClangImporterOptions &ClangImporterOpts,
247+
symbolgraphgen::SymbolGraphOptions &SymbolGraphOpts,
248+
SourceManager &SourceMgr, DiagnosticEngine &Diags,
249+
std::function<bool(llvm::StringRef, bool)> PreModuleImportCallback = {});
246250
~ASTContext();
247251

248252
/// Optional table of counters to report, nullptr when not collecting.
@@ -374,6 +378,10 @@ class ASTContext final {
374378
llvm::BumpPtrAllocator &
375379
getAllocator(AllocationArena arena = AllocationArena::Permanent) const;
376380

381+
/// An optional generic callback function invoked prior to importing a module.
382+
mutable std::function<bool(llvm::StringRef ModuleName, bool IsOverlay)>
383+
PreModuleImportCallback;
384+
377385
public:
378386
/// Allocate - Allocate memory from the ASTContext bump pointer.
379387
void *Allocate(unsigned long bytes, unsigned alignment,
@@ -872,6 +880,10 @@ class ASTContext final {
872880
/// for extended existential types.
873881
AvailabilityContext getParameterizedExistentialRuntimeAvailability();
874882

883+
/// Get the runtime availability of immortal ref-count symbols, which are
884+
/// needed to place array buffers into constant data sections.
885+
AvailabilityContext getImmortalRefCountSymbolsAvailability();
886+
875887
/// Get the runtime availability of features introduced in the Swift 5.2
876888
/// compiler for the target platform.
877889
AvailabilityContext getSwift52Availability();
@@ -1107,6 +1119,9 @@ class ASTContext final {
11071119
/// If a module by this name has already been loaded, the existing module will
11081120
/// be returned.
11091121
///
1122+
/// \param ModulePath The module's \c ImportPath which describes
1123+
/// the name of the module being loaded, possibly including submodules.
1124+
11101125
/// \returns The requested module, or NULL if the module cannot be found.
11111126
ModuleDecl *getModule(ImportPath::Module ModulePath);
11121127

include/swift/AST/Decl.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3644,7 +3644,7 @@ class NominalTypeDecl : public GenericTypeDecl, public IterableDeclContext {
36443644
bool isActor() const;
36453645

36463646
/// Whether this nominal type qualifies as a distributed actor, meaning that
3647-
/// it is either a distributed actor.
3647+
/// it is either a distributed actor or a DistributedActor constrained protocol.
36483648
bool isDistributedActor() const;
36493649

36503650
/// Whether this nominal type qualifies as any actor (plain or distributed).
@@ -5744,6 +5744,10 @@ class ParamDecl : public VarDecl {
57445744
Bits.ParamDecl.defaultArgumentKind = static_cast<unsigned>(K);
57455745
}
57465746

5747+
void setDefaultArgumentKind(ArgumentAttrs K) {
5748+
setDefaultArgumentKind(K.argumentKind);
5749+
}
5750+
57475751
bool isNoImplicitCopy() const {
57485752
return getAttrs().hasAttribute<NoImplicitCopyAttr>();
57495753
}

include/swift/AST/DefaultArgumentKind.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
#ifndef SWIFT_DEFAULTARGUMENTKIND_H
1818
#define SWIFT_DEFAULTARGUMENTKIND_H
1919

20+
#include "llvm/ADT/StringRef.h"
2021
#include <cstdint>
22+
#include <string>
2123

2224
namespace llvm {
2325
class StringRef;
@@ -52,6 +54,40 @@ enum class DefaultArgumentKind : uint8_t {
5254
};
5355
enum { NumDefaultArgumentKindBits = 4 };
5456

57+
struct ArgumentAttrs {
58+
DefaultArgumentKind argumentKind;
59+
bool isUnavailableInSwift = false;
60+
llvm::StringRef CXXOptionsEnumName = "";
61+
62+
ArgumentAttrs(DefaultArgumentKind argumentKind,
63+
bool isUnavailableInSwift = false,
64+
llvm::StringRef CXXOptionsEnumName = "")
65+
: argumentKind(argumentKind), isUnavailableInSwift(isUnavailableInSwift),
66+
CXXOptionsEnumName(CXXOptionsEnumName) {}
67+
68+
bool operator !=(const DefaultArgumentKind &rhs) const {
69+
return argumentKind != rhs;
70+
}
71+
72+
bool operator==(const DefaultArgumentKind &rhs) const {
73+
return argumentKind == rhs;
74+
}
75+
76+
bool hasDefaultArg() const {
77+
return argumentKind != DefaultArgumentKind::None;
78+
}
79+
80+
bool hasAlternateCXXOptionsEnumName() const {
81+
return !CXXOptionsEnumName.empty() && isUnavailableInSwift;
82+
}
83+
84+
llvm::StringRef getAlternateCXXOptionsEnumName() const {
85+
assert(hasAlternateCXXOptionsEnumName() &&
86+
"Expected a C++ Options type for C++-Interop but found none.");
87+
return CXXOptionsEnumName;
88+
}
89+
};
90+
5591
} // end namespace swift
5692

5793
#endif // LLVM_SWIFT_DEFAULTARGUMENTKIND_H

include/swift/AST/DiagnosticsSema.def

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,6 +1451,8 @@ NOTE(fixit_rename_in_swift,none,
14511451
"change Swift name to %0", (DeclName))
14521452
NOTE(fixit_rename_in_objc,none,
14531453
"change Objective-C selector to %0", (ObjCSelector))
1454+
NOTE(remove_async_add_task,none,
1455+
"remove 'async' and wrap in 'Task' to use concurrency in %0", (DeclName))
14541456
ERROR(no_objc_tagged_pointer_not_class_protocol,none,
14551457
"@unsafe_no_objc_tagged_pointer can only be applied to class protocols",
14561458
())
@@ -1464,11 +1466,12 @@ ERROR(cdecl_empty_name,none,
14641466
"@_cdecl symbol name cannot be empty", ())
14651467
ERROR(cdecl_throws,none,
14661468
"raising errors from @_cdecl functions is not supported", ())
1467-
ERROR(cdecl_async,none,
1468-
"@_cdecl functions cannot be asynchronous", ())
14691469

14701470
ERROR(attr_methods_only,none,
14711471
"only methods can be declared %0", (DeclAttribute))
1472+
ERROR(attr_decl_async,none,
1473+
"@%0 %1 cannot be asynchronous", (StringRef, DescriptiveDeclKind))
1474+
14721475
ERROR(access_control_in_protocol,none,
14731476
"%0 modifier cannot be used in protocols", (DeclAttribute))
14741477
NOTE(access_control_in_protocol_detail,none,
@@ -4563,6 +4566,9 @@ ERROR(effectful_keypath_component,none,
45634566
ERROR(local_function_executed_concurrently,none,
45644567
"concurrently-executed %0 %1 must be marked as '@Sendable'",
45654568
(DescriptiveDeclKind, DeclName))
4569+
ERROR(sendable_isolated_sync_function,none,
4570+
"%0 synchronous %1 %2 cannot be marked as '@Sendable'",
4571+
(ActorIsolation, DescriptiveDeclKind, DeclName))
45664572
ERROR(concurrent_access_of_local_capture,none,
45674573
"%select{mutation of|reference to}0 captured %1 %2 in "
45684574
"concurrently-executing code",

include/swift/AST/FileUnit.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ class FileUnit : public DeclContext, public ASTAllocated<FileUnit> {
5757

5858
/// Returns the synthesized file for this source file, creating one and
5959
/// inserting it into the module if it does not exist.
60-
///
61-
/// \warning Because this function mutates the parent module's list of files,
62-
/// it will invalidate the iterators of any upstream callers of
63-
/// \c ModuleDecl::getFiles().
6460
SynthesizedFileUnit &getOrCreateSynthesizedFile();
6561

6662
/// Look up a (possibly overloaded) value set at top-level scope

0 commit comments

Comments
 (0)