]> granicus.if.org Git - clang/commitdiff
[Objective-C diagnostic PATCH] Accept and ignore -Wreceiver-is-weak
authorFariborz Jahanian <fjahanian@apple.com>
Tue, 24 Mar 2015 17:14:20 +0000 (17:14 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Tue, 24 Mar 2015 17:14:20 +0000 (17:14 +0000)
warning until Xcode removes the warning setting.
rdar://20262140

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233093 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
test/SemaObjC/iboutlet.m

index b9737f23c00afe33f4561330e3df8449f0e21415..388069f848d4746085346c637db7764260a620c9 100644 (file)
@@ -889,6 +889,10 @@ def warn_dealloc_in_category : Warning<
 InGroup<DeallocInCategory>;
 def err_gc_weak_property_strong_type : Error<
   "weak attribute declared on a __strong type property in GC mode">;
+def warn_receiver_is_weak : Warning <
+  "weak %select{receiver|property|implicit property}0 may be "
+  "unpredictably set to nil">,
+  InGroup<DiagGroup<"receiver-is-weak">>, DefaultIgnore;
 def warn_arc_repeated_use_of_weak : Warning <
   "weak %select{variable|property|implicit property|instance variable}0 %1 is "
   "accessed multiple times in this %select{function|method|block|lambda}2 "
index 2ce4ce1d87af2695a54573f0bd6d2c2722ce06b5..597c4e462872843a3cb3fe3d77475e0ad055d1f0 100644 (file)
@@ -1,6 +1,7 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -Wno-objc-root-class -Warc-repeated-use-of-weak -fobjc-runtime-has-weak -verify %s
-// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-arc -Wno-objc-root-class -Warc-repeated-use-of-weak -fobjc-runtime-has-weak -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -Wno-objc-root-class -Wreceiver-is-weak -Warc-repeated-use-of-weak -fobjc-runtime-has-weak -verify %s
+// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-arc -Wno-objc-root-class -Wreceiver-is-weak -Warc-repeated-use-of-weak -fobjc-runtime-has-weak -verify %s
 // rdar://11448209
+// rdar://20259376
 
 #define READONLY readonly