[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 06:20:19 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;
----------------
egorzhdan wrote:

I think it's fine to represent this as a string. This way it's easier to add new cases in Swift without breaking C++ projects that build with older versions of Clang.

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


More information about the cfe-commits mailing list