================ @@ -1481,6 +1481,17 @@ static void handleOwnershipAttr(Sema &S, Decl *D, const ParsedAttr &AL) { break; } + // Allow only pointers to be return type for functions with ownership_takes + // attribute. This matches with current OwnershipAttr::Takes semantics + if (K == OwnershipAttr::Returns) { ---------------- Sirraide wrote:
This comment seems to be talking about `ownership_takes`, and not `ownership_returns`? https://github.com/llvm/llvm-project/pull/99564 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits