[PATCH] D31005: [Objective-C] Fix "repeated use of weak" warning with -fobjc-weak

Brian T. Kelley via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 15 15:35:22 PDT 2017


bkelley created this revision.

-Warc-repeated-use-of-weak should produce the same warnings with -fobjc-weak as it does with -objc-arc. Also check for ObjCWeak along with ObjCAutoRefCount when recording the use of an evaluated weak variable. Add a -fobjc-weak run to the existing arc-repeated-weak test case and adapt it slightly to work in both modes.


https://reviews.llvm.org/D31005

Files:
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaExprMember.cpp
  lib/Sema/SemaExprObjC.cpp
  lib/Sema/SemaPseudoObject.cpp
  test/SemaObjC/arc-repeated-weak.mm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31005.91945.patch
Type: text/x-patch
Size: 7407 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170315/825c5cd1/attachment-0001.bin>


More information about the cfe-commits mailing list