[clang] [Clang] Permit noescape on non-pointer types (PR #117344)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 3 08:17:33 PST 2024
AaronBallman wrote:
> We are planning to consume this downstream in the Swift compiler for C++ interop. Swift has non-escapable types, like Swift's `Span` type. The interop layer cannot bridge a C++ `std::span` as Swift's `Span` without this additional information from the API's authors.
Why should this live upstream if it basically only benefits a single downstream?
> The need to annotate this property was also raised in https://discourse.llvm.org/t/rfc-a-clangir-based-safe-c/83245 which was the main motivation to make this change upstream, to avoid having multiple different spellings across the parallel efforts to interoperate between safe and unsafe code.
That RFC did not really get much support because CIR isn't anywhere near far enough along to start making plans for it, so it's not really a compelling reason to move forward with these changes yet.
https://github.com/llvm/llvm-project/pull/117344
More information about the cfe-commits
mailing list