[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:18:02 PST 2024
================
@@ -511,6 +511,10 @@ static void ProcessAPINotes(Sema &S, FunctionOrMethod AnyFunc,
AnyTypeChanged = true;
}
+ // returns_(un)retained
+ if (!Info.SwiftReturnOwnership.empty())
----------------
Xazax-hun wrote:
I don't think this is a good idea. This lets the users create arbitrary SwiftAttr, even things we do not want them to. This issue goes away if we use enums.
https://github.com/llvm/llvm-project/pull/118938
More information about the cfe-commits
mailing list