swift
6ca1547b - [cxx-interop] Diagnose resilience for C++ types declared within namespaces correctly

Commit
322 days ago
[cxx-interop] Diagnose resilience for C++ types declared within namespaces correctly C++ types that are declared within namespaces are imported into a fake __ObjC module in Swift. This is meant to be a workaround for namespaces spanning across multiple Clang modules, which Swift decls normally cannot do. This change fixes two issues: 1. If a C++ type is declared within a namespace, the type isn't compatible with resilience, and it is used in a public resilient Swift interface, the compiler would emit an incorrect warning that mentioned the fake __ObjC module instead of the actual Clang module. 2. If the declaration is in an overlay for another module, the compiler would emit an error, while we actually consider this kind of usage to be safe. rdar://143631944
Author
Parents
Loading