Files
swift-mirror/lib/ClangImporter/ClangDerivedConformances.cpp
Egor Zhdan 3ca0d56675 [cxx-interop] Discard duplicating IteratorTy::iterator_category decls
libc++ recently split the `std` module into many top-level modules: 571178a21a

This broke the logic that conforms C++ iterator types to `UnsafeCxxInputIterator`/`UnsafeCxxRandomAccessIterator`. To determine if a C++ type is an iterator type, we look for its inner type called `iterator_category`. After module std was split, Clang instantiates `std::string::const_iterator::iterator_category` twice and doing a Clang lookup within the `const_iterator` type returns two identical `TypedefDecl`s. Clang itself has logic to merge them, but Swift doesn't.

rdar://119270491
2023-12-14 17:37:01 +00:00

40 KiB