[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak
Brian T. Kelley via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 23 17:55:11 PDT 2017
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 true;
-
- case Qualifiers::OCL_Strong:
- case Qualifiers::OCL_Weak:
- case Qualifiers::OCL_Autoreleasing:
- return false;
-
- case Qualifiers::OCL_None:
- break;
- }
- }
+ if (getQualifiers().hasObjCLifetime() && hasNonTrivialObjCLifetime())
+ return false;
----------------
rjmccall wrote:
> Is the first condition not implied by the second?
It definitely is. Thanks!
https://reviews.llvm.org/D31004
More information about the cfe-commits
mailing list