Files
swift-mirror/include/swift/PrintAsClang
Patryk Stefanski ad022559fc [cxx-interop] Add RETURNS_RETAINED annotations to C++ thunks
Swift functions exposed to C++ return +1 (retained) values, but the
generated C++ thunks in the -Swift.h header lacked ownership
annotations. This prevented Clang's static analyzer from verifying
reference counts when C++ code calls into Swift.

Add NS_RETURNS_RETAINED, CF_RETURNS_RETAINED, and SWIFT_RETURNS_RETAINED
annotations to thunk signatures based on the return type:
- NS_RETURNS_RETAINED for ObjC classes (NSString, etc.) and existentials (id)
- CF_RETURNS_RETAINED for CF types (CFString, etc.)
- SWIFT_RETURNS_RETAINED for foreign reference types

rdar://165231653
2026-04-24 22:25:32 -07:00
..