-
- Downloads
[Objective-C] Fix "weak-unavailable" warning with -fobjc-weak
Summary: clang should produce the same errors Objective-C classes that cannot be assigned to weak pointers under both -fobjc-arc and -fobjc-weak. Check for ObjCWeak along with ObjCAutoRefCount when analyzing pointer conversions. Add an -fobjc-weak pass to the existing arc-unavailable-for-weakref test cases to verify the behavior is the same. Reviewers: rsmith, doug.gregor, rjmccall Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31006 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299014 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/LangOptions.h 5 additions, 0 deletionsinclude/clang/Basic/LangOptions.h
- include/clang/Sema/Sema.h 8 additions, 8 deletionsinclude/clang/Sema/Sema.h
- lib/Sema/SemaCast.cpp 14 additions, 12 deletionslib/Sema/SemaCast.cpp
- lib/Sema/SemaExpr.cpp 10 additions, 9 deletionslib/Sema/SemaExpr.cpp
- lib/Sema/SemaExprCXX.cpp 5 additions, 6 deletionslib/Sema/SemaExprCXX.cpp
- lib/Sema/SemaExprObjC.cpp 10 additions, 6 deletionslib/Sema/SemaExprObjC.cpp
- lib/Sema/SemaPseudoObject.cpp 2 additions, 2 deletionslib/Sema/SemaPseudoObject.cpp
- test/SemaObjC/arc-unavailable-for-weakref.m 1 addition, 0 deletionstest/SemaObjC/arc-unavailable-for-weakref.m
- test/SemaObjCXX/arc-unavailable-for-weakref.mm 1 addition, 0 deletionstest/SemaObjCXX/arc-unavailable-for-weakref.mm
Loading
Please register or sign in to comment