diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 4c1e868548fb..1b1d0b151da0 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -3043,7 +3043,7 @@ def err_arc_mismatched_cast : Error< "an Objective-C pointer|an indirect pointer to an Objective-C pointer}1" " to %3 is disallowed with ARC">; def err_arc_nolifetime_behavior : Error< - "explicit ownership qualifier on cast result would have no effect">; + "explicit ownership qualifier on cast result has no effect">; def err_arc_objc_object_in_struct : Error< "ARC forbids Objective-C objects in structs or unions">; def err_arc_objc_property_default_assign_on_object : Error< diff --git a/clang/test/SemaObjC/arc-objc-lifetime.m b/clang/test/SemaObjC/arc-objc-lifetime.m index 2318fbfccd57..82c638927186 100644 --- a/clang/test/SemaObjC/arc-objc-lifetime.m +++ b/clang/test/SemaObjC/arc-objc-lifetime.m @@ -17,14 +17,14 @@ typedef __autoreleasing NSString * AUTORELEASEPNSString; - (CFStringRef)myString { CFStringRef myString = - (__bridge CFStringRef) (__strong NSString *)CFBridgingRelease(); // expected-error {{explicit ownership qualifier on cast result would have no effect}} + (__bridge CFStringRef) (__strong NSString *)CFBridgingRelease(); // expected-error {{explicit ownership qualifier on cast result has no effect}} myString = - (__bridge CFStringRef) (__autoreleasing PNSString) CFBridgingRelease(); // expected-error {{explicit ownership qualifier on cast result would have no effect}} + (__bridge CFStringRef) (__autoreleasing PNSString) CFBridgingRelease(); // expected-error {{explicit ownership qualifier on cast result has no effect}} myString = (__bridge CFStringRef) (AUTORELEASEPNSString) CFBridgingRelease(); // OK myString = - (__bridge CFStringRef) (typeof(__strong NSString *)) CFBridgingRelease(); // expected-error {{explicit ownership qualifier on cast result would have no effect}} + (__bridge CFStringRef) (typeof(__strong NSString *)) CFBridgingRelease(); // expected-error {{explicit ownership qualifier on cast result has no effect}} return myString; } diff --git a/clang/test/SemaObjC/arc-unavailable-for-weakref.m b/clang/test/SemaObjC/arc-unavailable-for-weakref.m index 210727ad39fd..fdf850206c2d 100644 --- a/clang/test/SemaObjC/arc-unavailable-for-weakref.m +++ b/clang/test/SemaObjC/arc-unavailable-for-weakref.m @@ -16,7 +16,7 @@ int main() { ns1 = (__weak sub *)obj; // expected-error {{assignment of a weak-unavailable object to a __weak object}} \ // expected-error {{class is incompatible with __weak references}} \ - // expected-error {{explicit ownership qualifier on cast result would have no effect}} + // expected-error {{explicit ownership qualifier on cast result has no effect}} } // rdar://9732636 @@ -32,7 +32,7 @@ NOWEAK * Test1() { __weak id weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}} return (__weak id)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK *' to a __weak object of type '__weak id'}} \ - // expected-error {{explicit ownership qualifier on cast result would have no effect}} + // expected-error {{explicit ownership qualifier on cast result has no effect}} } @protocol P @end @@ -45,6 +45,6 @@ NOWEAK * Test2() { __weak id

weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}} return (__weak id

)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK *' to a __weak object of type '__weak id

'}} \ - // expected-error {{explicit ownership qualifier on cast result would have no effect}} + // expected-error {{explicit ownership qualifier on cast result has no effect}} } diff --git a/clang/test/SemaObjCXX/arc-unavailable-for-weakref.mm b/clang/test/SemaObjCXX/arc-unavailable-for-weakref.mm index 2347061cfdb3..2a80aebaf8e5 100644 --- a/clang/test/SemaObjCXX/arc-unavailable-for-weakref.mm +++ b/clang/test/SemaObjCXX/arc-unavailable-for-weakref.mm @@ -16,7 +16,7 @@ int main() { ns1 = (__weak sub *)obj; // expected-error {{assignment of a weak-unavailable object to a __weak object}} \ // expected-error {{class is incompatible with __weak references}} \ - // expected-error {{explicit ownership qualifier on cast result would have no effect}} + // expected-error {{explicit ownership qualifier on cast result has no effect}} } // rdar://9732636 @@ -32,7 +32,7 @@ NOWEAK * Test1() { __weak id weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}} return (__weak id)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK *' to a __weak object of type '__weak id'}} \ - // expected-error {{explicit ownership qualifier on cast result would have no effect}} + // expected-error {{explicit ownership qualifier on cast result has no effect}} } @protocol P @end @@ -45,6 +45,6 @@ NOWEAK * Test2() { __weak id

weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}} return (__weak id)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK *' to a __weak object of type '__weak id'}} \ - // expected-error {{explicit ownership qualifier on cast result would have no effect}} + // expected-error {{explicit ownership qualifier on cast result has no effect}} }