From d26fef0e80033eaee3a2c95c14eb2e91931d92fb Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Wed, 22 Jun 2011 18:03:53 +0000 Subject: [PATCH] Change "cannot assign retained object.." warning to "assigning retained object.." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133625 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticSemaKinds.td | 2 +- test/SemaObjC/arc.m | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 55f1ec3956..17e0986648 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -2597,7 +2597,7 @@ def warn_arc_non_pod_class_with_object_member : Warning< "to make it ABI-compatible">, InGroup, 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|" diff --git a/test/SemaObjC/arc.m b/test/SemaObjC/arc.m index e1e6b07456..88d3f0cb85 100644 --- a/test/SemaObjC/arc.m +++ b/test/SemaObjC/arc.m @@ -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 -- 2.50.1