]> granicus.if.org Git - clang/commitdiff
Change "cannot assign retained object.." warning to "assigning retained object.."
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 22 Jun 2011 18:03:53 +0000 (18:03 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 22 Jun 2011 18:03:53 +0000 (18:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133625 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 55f1ec3956795298669ace6a36da4341865f5c00..17e098664857f49149af4d4bbb8361e55c3f2782 100644 (file)
@@ -2597,7 +2597,7 @@ def warn_arc_non_pod_class_with_object_member : Warning<
   "to make it ABI-compatible">, InGroup<AutomaticReferenceCountingABI>,
   DefaultIgnore;
 def warn_arc_retained_assign : Warning<
-  "cannot assign retained object to %select{weak|unsafe_unretained}0 variable">;
+  "assigning retained object to %select{weak|unsafe_unretained}0 variable">;
 def warn_arc_trivial_member_function_with_object_member : Warning<
   "%0 cannot be shared between ARC and non-ARC "
   "code; add a non-trivial %select{copy constructor|copy assignment operator|"
index e1e6b07456e40820bfd0b18cd71c9f199fedf9e6..88d3f0cb85263de874492ffd70a81dc4f67cfe5b 100644 (file)
@@ -525,11 +525,11 @@ typedef struct Bark Bark;
 @implementation Test30
 - (id) new { return 0; }
 - (void) Meth {
-  __weak id x = [Test30 new]; // expected-warning {{cannot assign retained object to weak variable}}
-  id __unsafe_unretained u = [Test30 new]; // expected-warning {{cannot assign retained object to unsafe_unretained variable}}
+  __weak id x = [Test30 new]; // expected-warning {{assigning retained object to weak variable}}
+  id __unsafe_unretained u = [Test30 new]; // expected-warning {{assigning retained object to unsafe_unretained variable}}
   id y = [Test30 new];
-  x = [Test30 new]; // expected-warning {{cannot assign retained object to weak variable}}
-  u = [Test30 new]; // expected-warning {{cannot assign retained object to unsafe_unretained variable}}
+  x = [Test30 new]; // expected-warning {{assigning retained object to weak variable}}
+  u = [Test30 new]; // expected-warning {{assigning retained object to unsafe_unretained variable}}
   y = [Test30 new];
 }
 @end