diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-06-22 18:03:53 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-06-22 18:03:53 +0000 |
commit | d26fef0e80033eaee3a2c95c14eb2e91931d92fb (patch) | |
tree | b3a0ea90e1ecbf02ee1b1004e0cad5705db2f326 | |
parent | 3404fe7105ecc3baa58b7ea725773de4112259d6 (diff) |
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
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 2 | ||||
-rw-r--r-- | 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<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|" 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 |