[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support to APINotes (PR #118938)

Egor Zhdan via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 08:30:27 PST 2024


================
@@ -3,6 +3,12 @@ Name: SwiftImportAs
 Tags:
 - Name: ImmortalRefType
   SwiftImportAs: reference
+  Methods:
+    - Name: methodReturningFrt__
+    - Name: methodReturningFrt_returns_unretained
+      SwiftReturnOwnership: 'returns_unretained'
+    - Name: methodReturningFrt_returns_retained
+      SwiftReturnOwnership: 'returns_retained'
----------------
egorzhdan wrote:

Let's drop `returns_` prefix from the attribute value to make it more concise. The word `Return` is already in the attribute name, so we don't get any extra information by repeating it in the attribute value.

https://github.com/llvm/llvm-project/pull/118938


More information about the cfe-commits mailing list