aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-10-31 17:27:06 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-10-31 17:27:06 +0000
commit56892c1c293d43b99fd84d27c831b1ce30541b0f (patch)
tree685fce4cc5878a742832fe0a15dd43d3189a8894
parenteea64802558cc398571938b1f28cda1d4fa79ec3 (diff)
Improve text of a diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143353 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td2
-rw-r--r--test/SemaObjC/arc-objc-lifetime.m6
-rw-r--r--test/SemaObjC/arc-unavailable-for-weakref.m6
-rw-r--r--test/SemaObjCXX/arc-unavailable-for-weakref.mm6
4 files changed, 10 insertions, 10 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 4c1e868548..1b1d0b151d 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/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/test/SemaObjC/arc-objc-lifetime.m b/test/SemaObjC/arc-objc-lifetime.m
index 2318fbfccd..82c6389271 100644
--- a/test/SemaObjC/arc-objc-lifetime.m
+++ b/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/test/SemaObjC/arc-unavailable-for-weakref.m b/test/SemaObjC/arc-unavailable-for-weakref.m
index 210727ad39..fdf850206c 100644
--- a/test/SemaObjC/arc-unavailable-for-weakref.m
+++ b/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<P, P1> * Test2() {
__weak id<P> weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}}
return (__weak id<P>)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK<P,P1> *' to a __weak object of type '__weak id<P>'}} \
- // 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/test/SemaObjCXX/arc-unavailable-for-weakref.mm b/test/SemaObjCXX/arc-unavailable-for-weakref.mm
index 2347061cfd..2a80aebaf8 100644
--- a/test/SemaObjCXX/arc-unavailable-for-weakref.mm
+++ b/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<P, P1> * Test2() {
__weak id<P> weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}}
return (__weak id<P, P1>)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK<P,P1> *' to a __weak object of type '__weak id<P,P1>'}} \
- // expected-error {{explicit ownership qualifier on cast result would have no effect}}
+ // expected-error {{explicit ownership qualifier on cast result has no effect}}
}