[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 20 23:00:32 PDT 2017
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 Qualifiers::OCL_Weak:
- case Qualifiers::OCL_Autoreleasing:
- return false;
-
- case Qualifiers::OCL_None:
- break;
- }
- }
+ if (getQualifiers().hasObjCLifetime() && hasNonTrivialObjCLifetime())
+ return false;
----------------
Is the first condition not implied by the second?
https://reviews.llvm.org/D31004
More information about the cfe-commits
mailing list