File tree Expand file tree Collapse file tree 2 files changed +22
-9
lines changed
test/Interop/SwiftToCxx/functions Expand file tree Collapse file tree 2 files changed +22
-9
lines changed Original file line number Diff line number Diff line change 55// RUN: %check-interop-cxx-header-in-clang(%t/functions.h)
66
77// CHECK-NOT: SWIFT_EXTERN bool $s9Functions24alwaysEmitIntoClientFuncyS2bF(bool x) SWIFT_NOEXCEPT SWIFT_CALL; // alwaysEmitIntoClientFunc(_:)
8- // CHECK-NOT: SWIFT_EXTERN double $s9Functions9asyncFuncyS2dYaF(double x) SWIFT_NOEXCEPT SWIFT_CALL; // asyncFunc(_:)
98
109// CHECK: namespace Functions {
1110// CHECK-EMPTY:
1211// CHECK-EMPTY:
1312// CHECK-EMPTY:
1413// CHECK-EMPTY:
15- // CHECK-EMPTY:
16- // CHECK-EMPTY:
1714// CHECK-NEXT: } // namespace Functions
1815
1916// CHECK-NOT: inline bool alwaysEmitIntoClientFunc(bool x) noexcept SWIFT_WARN_UNUSED_RESULT {
2017// CHECK-NOT: return _impl::$s9Functions24alwaysEmitIntoClientFuncyS2bF(x);
2118// CHECK-NOT: }
2219
23- // CHECK-NOT: inline double asyncFunc(double x) noexcept SWIFT_WARN_UNUSED_RESULT {
24- // CHECK-NOT: return _impl::$s9Functions9asyncFuncyS2dYaF(x);
25- // CHECK-NOT: }
26-
27- public func asyncFunc( _ x: Double ) async -> Double { return 2 * x }
28-
2920@_alwaysEmitIntoClient
3021public func alwaysEmitIntoClientFunc( _ x: Bool ) -> Bool { return !x }
Original file line number Diff line number Diff line change 1+ // RUN: %empty-directory(%t)
2+ // RUN: %target-swift-frontend %s -typecheck -module-name Functions -clang-header-expose-public-decls -emit-clang-header-path %t/functions.h
3+ // RUN: %FileCheck %s < %t/functions.h
4+
5+ // RUN: %check-interop-cxx-header-in-clang(%t/functions.h)
6+
7+ // CHECK-NOT: SWIFT_EXTERN double $s9Functions9asyncFuncyS2dYaF(double x) SWIFT_NOEXCEPT SWIFT_CALL; // asyncFunc(_:)
8+
9+ // CHECK: namespace Functions {
10+ // CHECK-EMPTY:
11+ // CHECK-EMPTY:
12+ // CHECK-EMPTY:
13+ // CHECK-EMPTY:
14+ // CHECK-NEXT: } // namespace Functions
15+
16+ // CHECK-NOT: inline double asyncFunc(double x) noexcept SWIFT_WARN_UNUSED_RESULT {
17+ // CHECK-NOT: return _impl::$s9Functions9asyncFuncyS2dYaF(x);
18+ // CHECK-NOT: }
19+
20+ // REQUIRES: concurrency
21+
22+ public func asyncFunc( _ x: Double ) async -> Double { return 2 * x }
You can’t perform that action at this time.
0 commit comments