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

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 06:26:01 PST 2024


================
@@ -542,6 +542,9 @@ class FunctionInfo : public CommonEntityInfo {
   /// The result type of this function, as a C type.
   std::string ResultType;
 
+  /// Swift name of this entity.
+  std::string SwiftReturnOwnership;
----------------
Xazax-hun wrote:

We talked about this with Egor offline. I am also OK with the string approach, looks like users can already inject arbitrary `SwiftAttr` using existing annotations. So we do not open up new things. That being said, one advantage of the enum approach is that the user might get a better diagnostic when something is misspelled. 

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


More information about the cfe-commits mailing list