1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
// RUN: %target-swift-ide-test -print-module -module-to-print=CustomIterator -source-filename=x -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s
// RUN: %target-swift-ide-test -print-module -module-to-print=CustomIterator -source-filename=x -I %S/Inputs -cxx-interoperability-mode=swift-6 | %FileCheck %s
// RUN: %target-swift-ide-test -print-module -module-to-print=CustomIterator -source-filename=x -I %S/Inputs -cxx-interoperability-mode=upcoming-swift | %FileCheck %s
// CHECK: struct ConstIterator : UnsafeCxxInputIterator {
// CHECK: func successor() -> ConstIterator
// CHECK: var pointee: Int32 { get }
// CHECK: typealias Pointee = Int32
// CHECK: static func == (lhs: ConstIterator, other: ConstIterator) -> Bool
// CHECK: }
// CHECK: struct ConstRACIterator : UnsafeCxxRandomAccessIterator, UnsafeCxxInputIterator {
// CHECK: func successor() -> ConstRACIterator
// CHECK: var pointee: Int32 { get }
// CHECK: typealias Pointee = Int32
// CHECK: typealias Distance = Int32
// CHECK: static func += (lhs: inout ConstRACIterator, v: ConstRACIterator.difference_type)
// CHECK: static func - (lhs: ConstRACIterator, other: ConstRACIterator) -> Int32
// CHECK: static func == (lhs: ConstRACIterator, other: ConstRACIterator) -> Bool
// CHECK: }
// CHECK: struct ConstRACIteratorRefPlusEq : UnsafeCxxRandomAccessIterator, UnsafeCxxInputIterator {
// CHECK: func successor() -> ConstRACIterator
// CHECK: var pointee: Int32 { get }
// CHECK: typealias Pointee = Int32
// CHECK: typealias Distance = Int32
// CHECK: static func += (lhs: inout ConstRACIteratorRefPlusEq, v: ConstRACIteratorRefPlusEq.difference_type)
// CHECK: static func - (lhs: ConstRACIteratorRefPlusEq, other: ConstRACIteratorRefPlusEq) -> Int32
// CHECK: static func == (lhs: ConstRACIteratorRefPlusEq, other: ConstRACIteratorRefPlusEq) -> Bool
// CHECK: }
// CHECK: struct ConstIteratorOutOfLineEq : UnsafeCxxInputIterator {
// CHECK: func successor() -> ConstIteratorOutOfLineEq
// CHECK: var pointee: Int32 { get }
// CHECK: }
// CHECK: func == (lhs: ConstIteratorOutOfLineEq, rhs: ConstIteratorOutOfLineEq) -> Bool
// CHECK: struct MinimalIterator : UnsafeCxxInputIterator {
// CHECK: func successor() -> MinimalIterator
// CHECK: var pointee: Int32 { get }
// CHECK: typealias Pointee = Int32
// CHECK: static func == (lhs: MinimalIterator, other: MinimalIterator) -> Bool
// CHECK: }
// CHECK: struct ForwardIterator : UnsafeCxxInputIterator {
// CHECK: func successor() -> ForwardIterator
// CHECK: var pointee: Int32 { get }
// CHECK: typealias Pointee = Int32
// CHECK: static func == (lhs: ForwardIterator, other: ForwardIterator) -> Bool
// CHECK: }
// CHECK: struct HasCustomIteratorTag : UnsafeCxxInputIterator {
// CHECK: func successor() -> HasCustomIteratorTag
// CHECK: var pointee: Int32 { get }
// CHECK: typealias Pointee = Int32
// CHECK: static func == (lhs: HasCustomIteratorTag, other: HasCustomIteratorTag) -> Bool
// CHECK: }
// CHECK: struct HasCustomRACIteratorTag : UnsafeCxxRandomAccessIterator, UnsafeCxxInputIterator {
// CHECK: func successor() -> HasCustomRACIteratorTag
// CHECK: var pointee: Int32 { get }
// CHECK: typealias Pointee = Int32
// CHECK: typealias Distance = Int32
// CHECK: static func += (lhs: inout HasCustomRACIteratorTag, x: Int32)
// CHECK: static func - (lhs: HasCustomRACIteratorTag, x: HasCustomRACIteratorTag) -> Int32
// CHECK: static func == (lhs: HasCustomRACIteratorTag, other: HasCustomRACIteratorTag) -> Bool
// CHECK: }
// CHECK: struct HasCustomIteratorTagInline : UnsafeCxxInputIterator {
// CHECK: func successor() -> HasCustomIteratorTagInline
// CHECK: var pointee: Int32 { get }
// CHECK: typealias Pointee = Int32
// CHECK: static func == (lhs: HasCustomIteratorTagInline, other: HasCustomIteratorTagInline) -> Bool
// CHECK: }
// CHECK: struct HasTypedefIteratorTag : UnsafeCxxInputIterator {
// CHECK: func successor() -> HasTypedefIteratorTag
// CHECK: var pointee: Int32 { get }
// CHECK: typealias Pointee = Int32
// CHECK: static func == (lhs: HasTypedefIteratorTag, other: HasTypedefIteratorTag) -> Bool
// CHECK: }
// CHECK-NOT: struct HasNoIteratorCategory : UnsafeCxxInputIterator
// CHECK-NOT: struct HasInvalidIteratorCategory : UnsafeCxxInputIterator
// CHECK-NOT: struct HasNoEqualEqual : UnsafeCxxInputIterator
// CHECK-NOT: struct HasInvalidEqualEqual : UnsafeCxxInputIterator
// CHECK-NOT: struct HasNoIncrementOperator : UnsafeCxxInputIterator
// CHECK-NOT: struct HasNoPreIncrementOperator : UnsafeCxxInputIterator
// CHECK-NOT: struct HasNoDereferenceOperator : UnsafeCxxInputIterator
// CHECK: struct TemplatedIterator<CInt> : UnsafeCxxInputIterator {
// CHECK: func successor() -> TemplatedIterator<CInt>
// CHECK: var pointee: Int32 { get }
// CHECK: typealias Pointee = Int32
// CHECK: static func == (lhs: TemplatedIterator<CInt>, other: TemplatedIterator<CInt>) -> Bool
// CHECK: }
// CHECK: struct TemplatedIteratorOutOfLineEq<CInt> : UnsafeCxxInputIterator {
// CHECK: func successor() -> TemplatedIteratorOutOfLineEq<CInt>
// CHECK: var pointee: Int32 { get }
// CHECK: typealias Pointee = Int32
// CHECK: }
// CHECK: struct TemplatedRACIteratorOutOfLineEq<CInt> : UnsafeCxxRandomAccessIterator, UnsafeCxxInputIterator {
// CHECK: func successor() -> TemplatedRACIteratorOutOfLineEq<CInt>
// CHECK: var pointee: Int32 { get }
// CHECK: typealias Pointee = Int32
// CHECK: typealias Distance = TemplatedRACIteratorOutOfLineEq<CInt>.difference_type
// CHECK: }
// CHECK: struct BaseIntIterator {
// CHECK: }
// CHECK: struct InheritedConstIterator : UnsafeCxxInputIterator {
// CHECK: }
// CHECK: struct InheritedTemplatedConstIterator<T> {
// CHECK: }
// CHECK: struct InheritedTemplatedConstIterator<CInt> : UnsafeCxxInputIterator {
// CHECK: }
// CHECK: struct InheritedTemplatedConstRACIterator<T> {
// CHECK: }
// CHECK: struct InheritedTemplatedConstRACIterator<CInt> : UnsafeCxxRandomAccessIterator, UnsafeCxxInputIterator {
// CHECK: }
// CHECK: struct InheritedTemplatedConstRACIteratorOutOfLineOps<T> {
// CHECK: }
// CHECK: struct InheritedTemplatedConstRACIteratorOutOfLineOps<CInt> : UnsafeCxxRandomAccessIterator, UnsafeCxxInputIterator {
// CHECK: }
// CHECK: struct InputOutputIterator : UnsafeCxxMutableInputIterator {
// CHECK: func successor() -> InputOutputIterator
// CHECK: var pointee: Int32
// CHECK: typealias Pointee = Int32
// CHECK: }
// CHECK: struct InputOutputConstIterator : UnsafeCxxMutableInputIterator {
// CHECK: func successor() -> InputOutputConstIterator
// CHECK: var pointee: Int32 { get nonmutating set }
// CHECK: typealias Pointee = Int32
// CHECK: }
// CHECK: struct MutableRACIterator : UnsafeCxxMutableRandomAccessIterator, UnsafeCxxMutableInputIterator {
// CHECK: func successor() -> MutableRACIterator
// CHECK: var pointee: Int32
// CHECK: typealias Pointee = Int32
// CHECK: typealias Distance = Int32
// CHECK: }
|