[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 12 10:36:53 PST 2018


ahatanak added inline comments.


================
Comment at: include/clang/AST/Type.h:1148
+    DK_objc_weak_lifetime,
+    DK_c_struct_strong_field
   };
----------------
rjmccall wrote:
> I don't think you want to refer to the fact that the C struct specifically contains a __strong field here.  As we add more reasons, would we create a new enumerator for each?  What if a struct is non-trivial for multiple reasons?  Just say that it's a non-trivial C struct.
I added an enumerator for DK_c_struct_strong_field since CodeGenFunction::needsEHCleanup distinguishes between `__weak` and `__strong` types. Is it not necessary to distinguish between a struct that has a `__weak` field and a struct that has a `__strong` field but not a `__weak` field? 


https://reviews.llvm.org/D41228





More information about the cfe-commits mailing list