File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
test/Interop/SwiftToCxx/functions Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,8 @@ class CFunctionSignatureTypePrinter
101
101
moduleContext(moduleContext), typeUseKind(typeUseKind) {}
102
102
103
103
void printInoutTypeModifier () {
104
- os << (languageMode == swift::OutputLanguageMode::Cxx ? " &" : " *" );
104
+ os << (languageMode == swift::OutputLanguageMode::Cxx ? " &"
105
+ : " * _Nonnull" );
105
106
}
106
107
107
108
bool printIfKnownSimpleType (const TypeDecl *typeDecl,
Original file line number Diff line number Diff line change 4
4
5
5
// RUN: %check-interop-cxx-header-in-clang(%t/functions.h)
6
6
7
- // CHECK: SWIFT_EXTERN void $s9Functions8inOutIntyySizF(ptrdiff_t * x) SWIFT_NOEXCEPT SWIFT_CALL; // inOutInt(_:)
8
- // CHECK: SWIFT_EXTERN void $s9Functions11inOutTwoIntyySiz_SiztF(ptrdiff_t * x, ptrdiff_t * y) SWIFT_NOEXCEPT SWIFT_CALL; // inOutTwoInt(_:_:)
9
- // CHECK: SWIFT_EXTERN void $s9Functions13inOutTwoParamyySbz_SdztF(bool * x, double * y) SWIFT_NOEXCEPT SWIFT_CALL; // inOutTwoParam(_:_:)
10
- // CHECK: SWIFT_EXTERN void $s9Functions24inoutTypeWithNullabilityyySVzF(void const * _Nonnull * x) SWIFT_NOEXCEPT SWIFT_CALL; // inoutTypeWithNullability(_:)
11
- // CHECK: SWIFT_EXTERN void $s9Functions25inoutUnsafeGenericPointeryySPys5Int32VGzF(int32_t const * _Nonnull * x) SWIFT_NOEXCEPT SWIFT_CALL; // inoutUnsafeGenericPointer(_:)
7
+ // CHECK: SWIFT_EXTERN void $s9Functions8inOutIntyySizF(ptrdiff_t * _Nonnull x) SWIFT_NOEXCEPT SWIFT_CALL; // inOutInt(_:)
8
+ // CHECK: SWIFT_EXTERN void $s9Functions11inOutTwoIntyySiz_SiztF(ptrdiff_t * _Nonnull x, ptrdiff_t * _Nonnull y) SWIFT_NOEXCEPT SWIFT_CALL; // inOutTwoInt(_:_:)
9
+ // CHECK: SWIFT_EXTERN void $s9Functions13inOutTwoParamyySbz_SdztF(bool * _Nonnull x, double * _Nonnull y) SWIFT_NOEXCEPT SWIFT_CALL; // inOutTwoParam(_:_:)
10
+ // CHECK: SWIFT_EXTERN void $s9Functions24inoutTypeWithNullabilityyySVzF(void const * _Nonnull * _Nonnull x) SWIFT_NOEXCEPT SWIFT_CALL; // inoutTypeWithNullability(_:)
11
+ // CHECK: SWIFT_EXTERN void $s9Functions25inoutUnsafeGenericPointeryySPys5Int32VGzF(int32_t const * _Nonnull * _Nonnull x) SWIFT_NOEXCEPT SWIFT_CALL; // inoutUnsafeGenericPointer(_:)
12
12
13
13
// CHECK: inline void inOutInt(swift::Int & x) noexcept {
14
14
// CHECK-NEXT: return _impl::$s9Functions8inOutIntyySizF(&x);
You can’t perform that action at this time.
0 commit comments