[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak

2017-03-27 Thread Brian T. Kelley via Phabricator via cfe-commits
bkelley added a comment. Thank you @rjmccall for the approval. I don't have commit access; would someone be willing to commit this path for me please? Thanks! https://reviews.llvm.org/D31004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak

2017-03-24 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Looks great, thanks! https://reviews.llvm.org/D31004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak

2017-03-23 Thread Brian T. Kelley via Phabricator via cfe-commits
bkelley updated this revision to Diff 92890. bkelley marked an inline comment as done. bkelley added a comment. Removed redundant conditions, per feedback from @rjmccall https://reviews.llvm.org/D31004 Files: lib/AST/Type.cpp lib/Sema/SemaExprCXX.cpp

[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak

2017-03-23 Thread Brian T. Kelley via Phabricator via cfe-commits
bkelley added a comment. Thanks for the feedback! Apologies for the slow turn around; I was out sick :( Comment at: lib/AST/Type.cpp:2026 - if (Context.getLangOpts().ObjCAutoRefCount) { -switch (getObjCLifetime()) { -case Qualifiers::OCL_ExplicitNone: - return

[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak

2017-03-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/Type.cpp:2026 - if (Context.getLangOpts().ObjCAutoRefCount) { -switch (getObjCLifetime()) { -case Qualifiers::OCL_ExplicitNone: - return true; - -case Qualifiers::OCL_Strong: -case

[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak

2017-03-17 Thread Brian T. Kelley via Phabricator via cfe-commits
bkelley added a comment. Looks like we can simplify everything by using `hasNonTrivialObjCLifetime()`, like in https://reviews.llvm.org/D31003. https://reviews.llvm.org/D31004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak

2017-03-17 Thread Brian T. Kelley via Phabricator via cfe-commits
bkelley updated this revision to Diff 92217. bkelley added a comment. Updated with feedback from @rjmccall https://reviews.llvm.org/D31004 Files: lib/AST/Type.cpp lib/Sema/SemaExprCXX.cpp test/SemaObjCXX/objc-weak-type-traits.mm Index: test/SemaObjCXX/objc-weak-type-traits.mm

[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak

2017-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. 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

[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak

2017-03-15 Thread Brian T. Kelley via Phabricator via cfe-commits
bkelley created this revision. 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.