[Objective-C] Fix "repeated use of weak" warning with -fobjc-weak
Summary: -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. Reviewers: rsmith, doug.gregor, jordan_rose, rjmccall Reviewed By: rjmccall Subscribers: arphaman, rjmccall, cfe-commits Differential Revision: https://reviews.llvm.org/D31005 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299011 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/Type.h 3 additions, 0 deletionsinclude/clang/AST/Type.h
- lib/AST/Type.cpp 5 additions, 1 deletionlib/AST/Type.cpp
- lib/Sema/SemaDecl.cpp 2 additions, 1 deletionlib/Sema/SemaDecl.cpp
- lib/Sema/SemaExpr.cpp 11 additions, 7 deletionslib/Sema/SemaExpr.cpp
- lib/Sema/SemaExprMember.cpp 4 additions, 6 deletionslib/Sema/SemaExprMember.cpp
- lib/Sema/SemaExprObjC.cpp 2 additions, 0 deletionslib/Sema/SemaExprObjC.cpp
- lib/Sema/SemaPseudoObject.cpp 7 additions, 9 deletionslib/Sema/SemaPseudoObject.cpp
- test/SemaObjC/arc-repeated-weak.mm 7 additions, 3 deletionstest/SemaObjC/arc-repeated-weak.mm
Loading
Please register or sign in to comment