swift
6db39f15 - [cxx-interop] Discard duplicating `IteratorTy::iterator_category` decls

Commit
1 year ago
[cxx-interop] Discard duplicating `IteratorTy::iterator_category` decls libc++ recently split the `std` module into many top-level modules: https://github.com/llvm/llvm-project/commit/571178a21a8bc105bf86cf4bf92f842e07792e1a 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 (cherry picked from commit 3ca0d56675e606f6f643664cc168e6351a155f3c)
Author
Committer
Parents
Loading