Similar to ARC, in ObjCWeak Objective-C object pointers qualified with a weak lifetime are not POD or trivial types. Update the type trait code to reflect this. Copy and adapt the arc-type-traits.mm test case to verify correctness.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I have similar feedback here to the other patch. Please try to see if there's some reasonable way to make this dependent just on the lifetime qualifier without paying attention to the language options. If we, say, decide to start supporting __strong in non-ARC modes, it'd be nice if that just worked without having to revisit all of this code.
Comment Actions
Looks like we can simplify everything by using hasNonTrivialObjCLifetime(), like in D31003.
lib/AST/Type.cpp | ||
---|---|---|
2026–2027 | Is the first condition not implied by the second? |
Comment Actions
Thanks for the feedback! Apologies for the slow turn around; I was out sick :(
lib/AST/Type.cpp | ||
---|---|---|
2026–2027 | It definitely is. Thanks! |
Comment Actions
Thank you @rjmccall for the approval. I don't have commit access; would someone be willing to commit this path for me please? Thanks!
Is the first condition not implied by the second?