[PATCH] D51507: Allow all supportable attributes to be used with #pragma clang attribute.

Kristina Brooks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 31 03:46:43 PDT 2018

kristina added a comment.

Giving it a second glance, just as an idea, maybe it's better to leave ObjC pragmas out for now, for another more narrower-scope revision/review specific to ObjC(/Swift)? Since they could cause incorrect code generation if combined in odd ways (as well as making no sense) especially with Automatic Reference Counting. For example a function annotated as returning a retained object while at the same time returning with release, and also a bridge annotation, may just miss the sema check and fail at runtime instead, which could be fairly erratic as it may vary depending on the `autoreleasepool` state as well as the runtime being used and could turn into a difficult bug to debug if it ever happened in the wild. I think semantic checker should catch the non-ObjC cases but only some ObjC cases. Another concern is Swift with Apple runtime and ObjC <=> Swift bridged objects (when Swift classes inherit ObjC classes or even interact with them) may introduce even more complications, and Swift patches and integration doesn't happen as part of mainline LLVM development, which complicates code review. Rest of it looks good however, not sure what you want to to do with the ObjC pragmas, they could be left in and re-reviewed later since that would mean they would end up in Swift development integration tree too.

  rC Clang


More information about the cfe-commits mailing list