Skip to content

Commit 4e3e07b

Browse files
committed
Revert "[Sema|Tests] Update users of library-level=api to expect new diagnostics"
This reverts commit d4a5cb2.
1 parent 20fb481 commit 4e3e07b

5 files changed

+5
-6
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() { // expected-warning{{public declarations should have an availability attribute with an introduction version}}
16+
public func inlinableUsingSPI() {
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() { // expected-warning{{public declarations should have an availability attribute with an introduction version}}
12+
public func inlinableUsingSPI() {
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/SPI/spi-only-and-library-level.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public struct LibStruct {}
2525
@_spiOnly import Lib
2626

2727
public func publicClient() -> LibStruct { fatalError() } // expected-error {{cannot use struct 'LibStruct' here; 'Lib' was imported for SPI only}}
28-
// expected-warning @-1 {{public declarations should have an availability attribute with an introduction version}}
2928
@_spi(X) public func spiClient() -> LibStruct { fatalError() }
3029

3130
//--- SPILib.swift

test/Sema/spi-available-inline.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class MacOSSPIClass { public init() {} }
1010
@available(macOS 10.4, *)
1111
public class iOSSPIClass { public init() {} }
1212

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

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 -require-explicit-availability=ignore
17+
// RUN: %target-typecheck-verify-swift -swift-version 5 -enable-library-evolution -module-name Test -target %target-next-stable-abi-triple -library-level api
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 -require-explicit-availability=ignore 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 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)