You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that the Clang included with Xcode16 (and possibly older), does not treat blocks that capture but are marked non-escaping as global blocks, while open source Apple Clang does. It seems like https://reviews.llvm.org/D49303 has effectively been reverted in Xcode's Clang.
I've noticed that the Clang included with Xcode16 (and possibly older), does not treat blocks that capture but are marked non-escaping as global blocks, while open source Apple Clang does. It seems like https://reviews.llvm.org/D49303 has effectively been reverted in Xcode's Clang.
I have a simple program:
If I dump the IR with open source Swift's Clang as follows:
I get the following definition for main:
We still seem to honor the change made in https://reviews.llvm.org/D49303. This is the version of Apple Clang I am testing with:
But if I repeat with Xcode16's Clang like so:
We don't treat the block as global even though it is marked with
NS_NOESCAPE
:Is there a reason this behavior was turned off in Xcode Clang? It seems beneficial to keep it. cc @ahatanaka @rjmccall
The text was updated successfully, but these errors were encountered: