jordan_rose added a reviewer: rjmccall. jordan_rose added a subscriber: rjmccall. jordan_rose added a comment.
The warning-related parts look reasonable to me. ================ Comment at: lib/Sema/SemaDecl.cpp:10184 + (!getLangOpts().ObjCAutoRefCount && getLangOpts().ObjCWeak && + VDecl->getType().getObjCLifetime() != Qualifiers::OCL_Weak)) && !Diags.isIgnored(diag::warn_arc_repeated_use_of_weak, ---------------- This condition's getting complicated, and it shows up in a few places. Would it make sense to factor it out? ================ Comment at: lib/Sema/SemaExpr.cpp:707 // balance that. - if (getLangOpts().ObjCAutoRefCount && + if ((getLangOpts().ObjCAutoRefCount || getLangOpts().ObjCWeak) && E->getType().getObjCLifetime() == Qualifiers::OCL_Weak) ---------------- This is the one section that //isn't// dealing with the warning. I'd like @rjmccall to verify that it's correct. ================ Comment at: lib/Sema/SemaExpr.cpp:10340 - } else if (getLangOpts().ObjCAutoRefCount) { + } else if (getLangOpts().ObjCAutoRefCount || getLangOpts().ObjCWeak) { checkUnsafeExprAssigns(Loc, LHSExpr, RHS.get()); ---------------- Does ObjCAutoRefCount imply ObjCWeak? If so, you could just use the latter. https://reviews.llvm.org/D31005 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits