"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|"
@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