mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Swift's ASTContext contained all of the logic to find the complete list of properties for an Objective-C class, which is used by the Clang importer to influence the mapping of Objective-C names into Swift. Swift's ASTContext also included a *cache* for this information, indexed by the Clang `ObjCInterfaceDecl *`. However, this cache was getting populated/queried from the Clang importer's name importer, such that the keys would be Clang declarations used to build modules and then deallocated. If that memory eventually gets reused for a different `ObjCInterfaceDecl *`, we would get incorrect/stale all-properties information. Almost Surely fixes rdar://problem/35347167, which is a nondeterministic failure where UIView's `addGestureRecognizer(_:)` gets occasionally imported as `add(_:)`.
14 KiB
14 KiB