[PATCH] D31006: [Objective-C] Fix "weak-unavailable" warning with -fobjc-weak
Brian T. Kelley via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 15 15:39:47 PDT 2017
bkelley created this revision.
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.
https://reviews.llvm.org/D31006
Files:
include/clang/Sema/Sema.h
lib/Sema/SemaCast.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaExprObjC.cpp
lib/Sema/SemaPseudoObject.cpp
test/SemaObjC/arc-unavailable-for-weakref.m
test/SemaObjCXX/arc-unavailable-for-weakref.mm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31006.91946.patch
Type: text/x-patch
Size: 11153 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170315/6db53094/attachment.bin>
More information about the cfe-commits
mailing list