Files
swift-mirror/test/Interop/SwiftToCxx/stdlib/swift-stdlib-in-cxx.swift
Alex Lorenz bd8c874e17 [interop][SwiftToCxx] experimentally expose Swift::String type to C++
The only member that's currently exposed is the default initializer, everything else is in extensions
2022-08-25 15:09:30 -07:00

20 lines
866 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -parse-as-library %platform-module-dir/Swift.swiftmodule/%module-target-triple.swiftinterface -enable-library-evolution -disable-objc-attr-requires-foundation-module -typecheck -module-name Swift -parse-stdlib -enable-experimental-cxx-interop -emit-clang-header-path %t/Swift.h -experimental-skip-all-function-bodies
// RUN: %FileCheck %s < %t/Swift.h
// RUN: %check-interop-cxx-header-in-clang(%t/Swift.h -Wno-unused-private-field -Wno-unused-function)
// CHECK: namespace Swift {
// CHECK: class String final {
// CHECK-NEXT: public:
// CHECK-NEXT: inline ~String() {
// CHECK: }
// CHECK-NEXT: inline String(const String &other) {
// CHECK: }
// CHECK-NEXT: inline String(String &&) = default;
// CHECK-NEXT: static inline String init();
// CHECK-NEXT: private:
// CHECK: } // namespace Swift