Skip to content

Commit d4c60ef

Browse files
committed
[Sema|Tests] Update users of library-level=api to expect new diagnostics
1 parent c3d1953 commit d4c60ef

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

test/ClangImporter/availability_spi_as_unavailable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public let c: SPIInterface1 // expected-error{{cannot use class 'SPIInterface1'
1313
public let d: SPIInterface2 // expected-error{{cannot use class 'SPIInterface2' here; it is an SPI imported from 'SPIContainer'}}
1414

1515
@inlinable
16-
public func inlinableUsingSPI() {
16+
public func inlinableUsingSPI() { // expected-warning{{public declarations should have an availability attribute with an introduction version}}
1717
SharedInterface.foo() // expected-error{{class method 'foo()' cannot be used in an '@inlinable' function because it is an SPI imported from 'SPIContainer'}}
1818
}
1919

test/ClangImporter/availability_spi_as_unavailable_bridging_header.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ public let c: SPIInterface1 // expected-error{{cannot use class 'SPIInterface1'
99
public let d: SPIInterface2 // expected-error{{cannot use class 'SPIInterface2' here; it is an SPI imported from '__ObjC'}}
1010

1111
@inlinable
12-
public func inlinableUsingSPI() {
12+
public func inlinableUsingSPI() { // expected-warning{{public declarations should have an availability attribute with an introduction version}}
1313
SharedInterface.foo() // expected-error{{class method 'foo()' cannot be used in an '@inlinable' function because it is an SPI imported from '__ObjC'}}
1414
}

test/Sema/spi-available-inline.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class MacOSSPIClass { public init() {} }
88
@_spi_available(iOS 8.0, *)
99
public class iOSSPIClass { public init() {} }
1010

11-
@inlinable public func foo() {
11+
@inlinable public func foo() { // expected-warning{{public declarations should have an availability attribute with an introduction version}}
1212
_ = MacOSSPIClass() // expected-error {{class 'MacOSSPIClass' cannot be used in an '@inlinable' function because it is SPI}}
1313
_ = iOSSPIClass()
1414
}

test/attr/attr_inlinable_available.swift

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

1515

1616
// Check that `-library-level api` implies `-target-min-inlining-version min`
17-
// RUN: %target-typecheck-verify-swift -swift-version 5 -enable-library-evolution -module-name Test -target %target-next-stable-abi-triple -library-level api
17+
// RUN: %target-typecheck-verify-swift -swift-version 5 -enable-library-evolution -module-name Test -target %target-next-stable-abi-triple -library-level api -require-explicit-availability=ignore
1818

1919

2020
// Check that these rules are only applied when requested and that at least some
@@ -24,7 +24,7 @@
2424

2525
// Check that -target-min-inlining-version overrides -library-level, allowing
2626
// library owners to disable this behavior for API libraries if needed.
27-
// RUN: not %target-typecheck-verify-swift -swift-version 5 -enable-library-evolution -module-name Test -target %target-next-stable-abi-triple -target-min-inlining-version target -library-level api 2>&1 | %FileCheck --check-prefix NON_MIN %s
27+
// RUN: not %target-typecheck-verify-swift -swift-version 5 -enable-library-evolution -module-name Test -target %target-next-stable-abi-triple -target-min-inlining-version target -library-level api -require-explicit-availability=ignore 2>&1 | %FileCheck --check-prefix NON_MIN %s
2828

2929

3030
// Check that we respect -target-min-inlining-version by cranking it up high

0 commit comments

Comments
 (0)