File tree Expand file tree Collapse file tree 4 files changed +21
-2
lines changed
test/Interop/Cxx/stdlib/overlay Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ add_swift_host_library(swiftClangImporter STATIC
28
28
target_link_libraries (swiftClangImporter PRIVATE
29
29
swiftAST
30
30
swiftParse
31
+ swiftSema
31
32
clangTooling
32
33
LLVMBitstreamReader )
33
34
Original file line number Diff line number Diff line change @@ -228,9 +228,9 @@ void swift::conformToCxxSequenceIfNeeded(
228
228
return ;
229
229
230
230
// Check if RawIterator conforms to UnsafeCxxInputIterator.
231
- auto rawIteratorConformanceRef = decl->getModuleContext ()->lookupConformance (
231
+ auto rawIteratorConformanceRef = decl->getModuleContext ()->conformsToProtocol (
232
232
rawIteratorTy, cxxIteratorProto);
233
- if (!rawIteratorConformanceRef.isConcrete ())
233
+ if (!rawIteratorConformanceRef || !rawIteratorConformanceRef .isConcrete ())
234
234
return ;
235
235
auto rawIteratorConformance = rawIteratorConformanceRef.getConcrete ();
236
236
auto pointeeDecl =
Original file line number Diff line number Diff line change @@ -86,4 +86,16 @@ struct HasBeginEndReturnRef {
86
86
const ConstIterator &end () const { return e; }
87
87
};
88
88
89
+ template <typename A> struct NoDefinition ;
90
+
91
+ template <typename A, typename NoDef = NoDefinition<A>>
92
+ struct HasTemplatedIterator {
93
+ typedef NoDef* iterator; // OpaquePointer
94
+
95
+ iterator begin () const ;
96
+ iterator end () const ;
97
+ };
98
+
99
+ typedef HasTemplatedIterator<int > HasUninstantiatableIterator;
100
+
89
101
#endif // TEST_INTEROP_CXX_STDLIB_INPUTS_CUSTOM_SEQUENCE_H
Original file line number Diff line number Diff line change 58
58
// CHECK-NOT: typealias Iterator
59
59
// CHECK-NOT: typealias RawIterator
60
60
// CHECK: }
61
+ // CHECK: struct __CxxTemplateInst20HasTemplatedIteratorIi12NoDefinitionIiEE {
62
+ // CHECK-NOT: typealias Element
63
+ // CHECK-NOT: typealias Iterator
64
+ // CHECK-NOT: typealias RawIterator
65
+ // CHECK: }
66
+ // CHECK: typealias HasUninstantiatableIterator = __CxxTemplateInst20HasTemplatedIteratorIi12NoDefinitionIiEE
You can’t perform that action at this time.
0 commit comments