Skip to content

Commit 04aaae2

Browse files
authored
Merge pull request #3750 from swiftwasm/release/5.5
[pull] swiftwasm-release/5.5 from release/5.5
2 parents c80dac2 + 242bc47 commit 04aaae2

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed

include/swift/AST/DiagnosticsModuleDiffer.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ERROR(type_witness_change,none,"%0 has type witness type for %1 changing from %2
7676

7777
ERROR(decl_new_witness_table_entry,none,"%0 now requires%select{| no}1 new witness table entry", (StringRef, bool))
7878

79-
ERROR(new_decl_without_intro,none,"%0 is a new API without @available attribute", (StringRef))
79+
WARNING(new_decl_without_intro,none,"%0 is a new API without @available attribute", (StringRef))
8080

8181
ERROR(objc_name_change,none,"%0 has ObjC name change from %1 to %2", (StringRef, StringRef, StringRef))
8282

@@ -88,7 +88,7 @@ ERROR(not_inheriting_convenience_inits,none,"%0 no longer inherits convenience i
8888

8989
ERROR(enum_case_added,none,"%0 has been added as a new enum case", (StringRef))
9090

91-
ERROR(demangled_name_changed,none,"%0 has mangled name changing from '%1' to '%2'", (StringRef, StringRef, StringRef))
91+
WARNING(demangled_name_changed,none,"%0 has mangled name changing from '%1' to '%2'", (StringRef, StringRef, StringRef))
9292

9393
WARNING(cannot_read_allowlist,none,"cannot read breakage allowlist at '%0'", (StringRef))
9494

include/swift/AST/DiagnosticsSema.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,8 +1581,8 @@ ERROR(originally_definedin_topleve_decl,none,
15811581
ERROR(originally_definedin_need_available,none,
15821582
"need @available attribute for @%0", (StringRef))
15831583

1584-
ERROR(originally_definedin_must_after_available_version,none,
1585-
"moved version from @%0 must after introduced OS version", (StringRef))
1584+
ERROR(originally_definedin_must_not_before_available_version,none,
1585+
"symbols are moved to the current module before they were available in the OSs", (StringRef))
15861586

15871587
// Alignment attribute
15881588
ERROR(alignment_not_power_of_two,none,

lib/Sema/TypeCheckAttr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3270,9 +3270,9 @@ void AttributeChecker::checkOriginalDefinedInAttrs(Decl *D,
32703270
AttrName);
32713271
return;
32723272
}
3273-
if (IntroVer.getValue() >= Attr->MovedVersion) {
3273+
if (IntroVer.getValue() > Attr->MovedVersion) {
32743274
diagnose(AtLoc,
3275-
diag::originally_definedin_must_after_available_version,
3275+
diag::originally_definedin_must_not_before_available_version,
32763276
AttrName);
32773277
return;
32783278
}

stdlib/public/Concurrency/GlobalExecutor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static constexpr size_t globalQueueCacheCount =
269269
static_cast<size_t>(JobPriority::UserInteractive) + 1;
270270
static std::atomic<dispatch_queue_t> globalQueueCache[globalQueueCacheCount];
271271

272-
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || defined(__linux__)
272+
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || !defined(__APPLE__)
273273
extern "C" void dispatch_queue_set_width(dispatch_queue_t dq, long width);
274274
#endif
275275

@@ -289,7 +289,7 @@ static dispatch_queue_t getGlobalQueue(JobPriority priority) {
289289
if (SWIFT_LIKELY(queue))
290290
return queue;
291291

292-
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || defined(__linux__)
292+
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || !defined(__APPLE__)
293293
const int DISPATCH_QUEUE_WIDTH_MAX_LOGICAL_CPUS = -3;
294294

295295
// Create a new cooperative concurrent queue and swap it in.

test/Sema/diag_originally_definedin.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
public func foo() {}
77

88
@available(macOS 10.13, *)
9-
@_originallyDefinedIn(module: "original", OSX 10.12) // expected-error {{moved version from @_originallyDefinedIn must after introduced OS version}}
9+
@_originallyDefinedIn(module: "original", OSX 10.12) // expected-error {{symbols are moved to the current module before they were available in the OSs}}
1010
public class C {
1111
@_originallyDefinedIn(module: "original", OSX 10.13) // expected-error {{@_originallyDefinedIn is only applicable to top-level decl}}
1212
public func foo() {}
1313
}
1414

15+
@available(macOS 10.13, *)
16+
@_originallyDefinedIn(module: "original", OSX 10.13)
17+
public class D {}
18+
1519
@available(macOS 10.9, *)
1620
@_originallyDefinedIn(module: "original", _myProject 2.0) // expected-error {{expected at least one platform version in @_originallyDefinedIn}}
1721
// expected-error @-1 {{reference to undefined version '2.0' for availability macro '_myProject'}}

test/api-digester/breakage-allowlist.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424

2525
// RUN: not %api-digester -diagnose-sdk -baseline-dir %t.baseline -module Foo -I %t.mod2 -module-cache-path %t.module-cache %clang-importer-sdk-nosource -abi -compiler-style-diags
2626

27-
// RUN: not %api-digester -diagnose-sdk -baseline-dir %t.baseline -module Foo -I %t.mod2 -module-cache-path %t.module-cache %clang-importer-sdk-nosource -abi -compiler-style-diags -breakage-allowlist-path %t/incomplete-allowlist.txt
27+
// RUN: %api-digester -diagnose-sdk -baseline-dir %t.baseline -module Foo -I %t.mod2 -module-cache-path %t.module-cache %clang-importer-sdk-nosource -abi -compiler-style-diags -breakage-allowlist-path %t/incomplete-allowlist.txt
2828

2929
// RUN: %api-digester -diagnose-sdk -baseline-dir %t.baseline -module Foo -I %t.mod2 -module-cache-path %t.module-cache %clang-importer-sdk-nosource -abi -compiler-style-diags -breakage-allowlist-path %t/complete-allowlist.txt
3030

3131
// RUN: not %api-digester -diagnose-sdk -baseline-dir %t.baseline -module Foo -I %t.mod2 -module-cache-path %t.module-cache %clang-importer-sdk-nosource -abi -serialize-diagnostics-path %t/serialized-diag.dia
3232
// RUN: ls %t/serialized-diag.dia
3333

34-
// RUN: not %api-digester -diagnose-sdk -baseline-dir %t.baseline -module Foo -I %t.mod2 -module-cache-path %t.module-cache %clang-importer-sdk-nosource -abi -serialize-diagnostics-path %t/serialized-diag.dia -breakage-allowlist-path %t/incomplete-allowlist.txt
34+
// RUN: %api-digester -diagnose-sdk -baseline-dir %t.baseline -module Foo -I %t.mod2 -module-cache-path %t.module-cache %clang-importer-sdk-nosource -abi -serialize-diagnostics-path %t/serialized-diag.dia -breakage-allowlist-path %t/incomplete-allowlist.txt
3535
// RUN: ls %t/serialized-diag.dia
3636

3737
// RUN: %api-digester -diagnose-sdk -baseline-dir %t.baseline -module Foo -I %t.mod2 -module-cache-path %t.module-cache %clang-importer-sdk-nosource -abi -serialize-diagnostics-path %t/serialized-diag.dia -breakage-allowlist-path %t/complete-allowlist.txt

0 commit comments

Comments
 (0)